Fix another segfault in 1998/schnitzi

The program would also crash if the arg had any character that's not a
digit or if the arg had only 0s in it (it would work if it had 0
followed by a digit other than 0). In other words if it is converted to
0 it would segfault.

The bugs.md file has been updated as well to note what's also now in the
README.md file: even a relatively small number can cause a substantial
amount of lines of output. For instance the number 9 causes 771999 lines
(!!) of output.
This commit is contained in:
Cody Boone Ferguson committed 2023-03-29 11:46:03 -07:00
1 parent df63e2f423
commit 1f6e7f2aa0
3 files changed
+24 -5

No files matched your search

+3 -2
View File
@@ -52,5 +52,6 @@ void x_(){ O=g; *r=y[k-2]; _=r; j=o_; }
void d (){ O=g; *r=y[k]; _=r; k=k+1; m=k<z; w=_t; l=p_; j=p; }
void y_(){ O=g; *r=x[17][1]+k; _=r; j=q_; }
void r_(){ O=_b; _=x[17]; s=(char**)_d; s=s+1; i=*s; q=0; }
main(int v,char **V){ if (V[1]) {O=r_; _d=V;
x: (O)(); goto x; }}
main(int v,char **V){ if (V[1]) {if(atoi(V[1])!=0) {
q=0; O=r_; _d=V;
x: (O)(); goto x; }}}