Fix 1994/horton - check args

This commit is contained in:
Cody Boone Ferguson committed 2023-10-30 05:41:15 -07:00
1 parent 51d1e9e4c4
commit d629239eef
5 files changed
+9 -32

No files matched your search

+2 -2
View File
@@ -59,11 +59,11 @@ ARCH=
# Defines that are needed to compile
#
CDEFINE=
CDEFINE= -DE='exit(1)' -DA=argc
# Include files that are needed to compile
#
CINCLUDE=
CINCLUDE= -include stdlib.h
# Optimization
#
-17
View File
@@ -11,17 +11,6 @@ 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 [1994 horton in bugs.md](/bugs.md#1994-horton).
## To use:
```sh
@@ -30,12 +19,6 @@ For more detailed information see [1994 horton in bugs.md](/bugs.md#1994-horton)
`A`, `B`, `C` and `D` are numeric arguments.
### INABIAF - it's not a bug it's a feature! :-)
Running this program without enough args will very likely crash or do something
else.
## Try:
```sh
./horton 3 2 1 0
+1 -1
View File
@@ -1,6 +1,6 @@
#define S(r, c) f[r][c] = 1;
char f[96][160]; main(argc, argv) char **argv; { double x, y, atof(); int
char f[96][160]; main(argc, argv) char **argv; {if(A<5)E;double x, y; int
r ,
c ,
bi ,