Merge pull request #208 from xexyl/1998-schnitzi
Fix another segfault in 1998/schnitzi
This commit is contained in:
3 files changed
+24
-5
No files matched your search
+10
-2
@@ -28,9 +28,17 @@
|
||||
echo 324 >> data
|
||||
./sort < data
|
||||
|
||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed two segfaults in
|
||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed three segfaults in
|
||||
this entry. The first was caused by invalid data types. The second was triggered
|
||||
if one did not specify any arg. Thank you Cody for your assistance!
|
||||
if one did not specify any arg. The third happened if the arg was had any
|
||||
characters that were not the digits 1 - 9 (if it started with 0 it could work as
|
||||
long as another digit followed it and there were no other non-digits). Thank you
|
||||
Cody for your assistance!
|
||||
|
||||
NOTE: the larger the number the number of lines of output can become
|
||||
substantially higher as well. Doing `./schnitzi 9` will actually print 771999
|
||||
lines!
|
||||
|
||||
|
||||
## Judges' comments
|
||||
|
||||
|
||||
@@ -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; }}}
|
||||
@@ -93,7 +93,8 @@ formatting code.
|
||||
## STATUS: INABIAF - please **DO NOT** fix
|
||||
### INABIAF: It's not a bug it's a feature :-)
|
||||
|
||||
Entries with this status should NOT be touched: they are system specific by design
|
||||
Entries with this status should NOT be touched (unless they have another status
|
||||
that suggests that issue can be changed): they are system specific by design
|
||||
or are other things that are not actually bugs even if they appear to be but are
|
||||
noteworthy nonetheless.
|
||||
|
||||
@@ -516,6 +517,15 @@ Please DO NOT change this either.
|
||||
If there are any other warnings triggered by your compiler please DO NOT fix
|
||||
those either!
|
||||
|
||||
Another important note is that as the number passed into the program gets bigger
|
||||
the number of lines of output gets substantially larger. For instance:
|
||||
|
||||
```sh
|
||||
$ ./schnitzi 9|wc -l
|
||||
771999
|
||||
```
|
||||
|
||||
|
||||
# 1999
|
||||
|
||||
There was no IOCCC in 1999.
|
||||
|
||||
Reference in new issue
Block a user