Fix segfault in 1992/westley without enough args
This commit is contained in:
1 parent
e529db9865
commit
04b2b59797
2 files changed
+5
-3
No files matched your search
@@ -15,7 +15,9 @@
|
|||||||
|
|
||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for clang by
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this for clang by
|
||||||
changing the third and fourth arg of main() to be ints inside main(); clang
|
changing the third and fourth arg of main() to be ints inside main(); clang
|
||||||
requires args 2 - 4 to be `char **`. Thank you Cody for your assistance!
|
requires args 2 - 4 to be `char **`. He also fixed it so that the program would
|
||||||
|
not segfault if not enough args were specified. Thank you Cody for your
|
||||||
|
assistance!
|
||||||
|
|
||||||
|
|
||||||
### To run
|
### To run
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
main(l
|
main(l
|
||||||
,a)char**a;{int n;int d;
|
,a)char**a;{int n;int d;
|
||||||
for(d=atoi(a[1])/10*80-
|
if (l>2)for(d=atoi(a[1])/10
|
||||||
atoi(a[2])/5-596;n="@NKA\
|
*80-atoi(a[2])/5-596;n="@NKA\
|
||||||
CLCCGZAAQBEAADAFaISADJABBA^\
|
CLCCGZAAQBEAADAFaISADJABBA^\
|
||||||
SNLGAQABDAXIMBAACTBATAHDBAN\
|
SNLGAQABDAXIMBAACTBATAHDBAN\
|
||||||
ZcEMMCCCCAAhEIJFAEAAABAfHJE\
|
ZcEMMCCCCAAhEIJFAEAAABAfHJE\
|
||||||
|
|||||||
Reference in new issue
Block a user