Fix bugs in 1990/westley
If no arg is specified it crashed. If arg was not a number > 0 it entered an infinite loop. Both have been fixed, exiting 1. These checks were NOT done in the alt code as that's a copy of the original code.
This commit is contained in:
1 parent
92cb3c43db
commit
1df3b50b23
4 files changed
+8
-32
No files matched your search
+2
-19
@@ -15,30 +15,13 @@ make all
|
||||
```
|
||||
|
||||
|
||||
### Bugs and (Mis)features
|
||||
|
||||
The current status of this entry is:
|
||||
|
||||
```
|
||||
STATUS: known bug - please help us fix
|
||||
```
|
||||
|
||||
For more detailed information see [1990 westley in bugs.md](/bugs.md#1990-westley).
|
||||
|
||||
|
||||
## To use:
|
||||
|
||||
```sh
|
||||
./westley number
|
||||
./westley <number
|
||||
```
|
||||
|
||||
|
||||
### INABIAF - it's not a bug it's a feature :-)
|
||||
|
||||
This entry will very likely crash or do something else without an arg.
|
||||
|
||||
This program will enter an infinite loop if input is not a number > 0.
|
||||
|
||||
The number should be greater than 0.
|
||||
|
||||
## Try:
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ char*lie;
|
||||
|
||||
dear; (char)lotte--;
|
||||
|
||||
if (ly < 2 || atoi(die[1])<1) exit(1);
|
||||
for(get= !me;; not){
|
||||
|
||||
1 - out & out ;lie;{
|
||||
|
||||
Reference in new issue
Block a user