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:
1 parent
df63e2f423
commit
1f6e7f2aa0
3 files changed
+24
-5
No files matched your search
@@ -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