Merge pull request #176 from xexyl/1992-westley

Fix segfault in 1992/westley without enough args
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-03-26 16:59:40 -07:00
commit f491172c06
2 files changed
+6 -4

No files matched your search

+3 -1
View File
@@ -15,7 +15,9 @@
[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
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
+3 -3
View File
@@ -1,7 +1,7 @@
main(l
,a)char**a;{int n;int d;
for(d=atoi(a[1])/10*80-
atoi(a[2])/5-596;n="@NKA\
,a)char**a;{int n;int d;
if (l>2)for(d=atoi(a[1])/10
*80-atoi(a[2])/5-596;n="@NKA\
CLCCGZAAQBEAADAFaISADJABBA^\
SNLGAQABDAXIMBAACTBATAHDBAN\
ZcEMMCCCCAAhEIJFAEAAABAfHJE\