Fix segfault without arg in 2001/cheong
This commit is contained in:
1 parent
cdaf69c123
commit
13fb787f0e
2 files changed
+4
-3
No files matched your search
@@ -15,8 +15,9 @@ make
|
|||||||
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with
|
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed this to work with
|
||||||
clang by adding another function that is allowed to have a third arg as an int,
|
clang by adding another function that is allowed to have a third arg as an int,
|
||||||
not a `char **`. He chose pain() because it's a four letter word that would
|
not a `char **`. He chose pain() because it's a four letter word that would
|
||||||
match the format and because it's pain that clang forces this. :-) Thank you
|
match the format and because it's pain that clang forces this. :-) He also fixed
|
||||||
Cody for your assistance!
|
a segfault in the case that no arg is specified. Thank you Cody for your
|
||||||
|
assistance!
|
||||||
|
|
||||||
|
|
||||||
### To run:
|
### To run:
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ c=o+ (D[I]+82)%10-(I>l/2)*
|
|||||||
:!(o=pain(c/10,O,I-1))*((c+999
|
:!(o=pain(c/10,O,I-1))*((c+999
|
||||||
)%10-(D[I]+92)%10);}return o;}
|
)%10-(D[I]+92)%10);}return o;}
|
||||||
int main(int o,char **O) {
|
int main(int o,char **O) {
|
||||||
return pain(o, O, l); }
|
return O[1]?pain(o, O, l):1; }
|
||||||
Reference in new issue
Block a user