diff --git a/2006/toledo2/README.md b/2006/toledo2/README.md index ae08accfa..c25512b11 100644 --- a/2006/toledo2/README.md +++ b/2006/toledo2/README.md @@ -20,14 +20,8 @@ make [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in this program which was making it fail to work under macOS - it did not seem to be a problem under linux, at least not fedora. The problem was wrong variable -types - implicit `int`s instead of `longs` and two `FILE *`s. The `long` references -:-) were taken from [Yusuke Endoh](/winners.html#Yusuke_Endoh) and technically -it works if all the variables are `long` but this would trigger (if not -silenced) additional warnings and the correct type is `FILE *`. However changing -them all to `FILE *` (including some that are used as a file) cause compilation -errors. It might end up that a cast is sufficient or the wrong combination is -used but for now this will work and works with both macOS and linux. Thank you -Cody (and Yusuke)! +types - implicit `int`s instead of `FILE *`s. It now works with both macOS and +linux. Thank you Cody! To end execution press `ctrl-z`. As mentioned in the author's remarks and in the below section, it is supposed to crash on termination though Cody noted this diff --git a/2006/toledo2/toledo2.c b/2006/toledo2/toledo2.c index 12ae76a2e..c441c13c5 100644 --- a/2006/toledo2/toledo2.c +++ b/2006/toledo2/toledo2.c @@ -19,7 +19,7 @@ unsigned char o[10],l[78114],*c=l,*k=l #define d(e)o[e]+256*o[e-1] #define h(l)s=l>>8&1|128&y|!(y&255)*64|16&z|2,y^=y>>4,y^=y<<2,y^=~y>>1,s|=y&4 -+64506; FILE *u, *v; long e,V,x,y,z,Z; main(r,U)char**U;{ ++64506; FILE *u, *v, *e, *V; int x,y,z,Z; main(r,U)char**U;{ { { { } } } { { { } } } { { { } } } { { { } } } { { { } } } { { { } } } { { { } } } { { { } } }