diff --git a/1993/schnitzi/schnitzi.c b/1993/schnitzi/schnitzi.c index 55c4232b3..e947800a6 100644 --- a/1993/schnitzi/schnitzi.c +++ b/1993/schnitzi/schnitzi.c @@ -2,7 +2,7 @@ #include #include #include - +#define gets(x) fgets((x), 111, stdin) #define iii\ ( I ) if ( ii(I,6\ ) )I [ strlen(I ) -1]=!1 @@ -30,6 +30,6 @@ ) printf ( " %s",li1[l1l++] ) ;puts ( "." ) ;}}else{sprintf ( il1,"cat %s;echo",lll[1] ) ;system ( il1 ) ;}printf -( "\n? " ) ; fgets ( il1, 111 , stdin +( "\n? " ) ; gets ( il1 ) ;sprintf ( i1l,"%s %s %s",lll[!1 ] ,lll[1],il1);system ( i1l); } diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 4e6bf7d2f..932410ceb 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -663,6 +663,8 @@ Cody made this use `fgets()` not `gets()` to make it safer and to prevent an annoying warning with compiling and/or linking and/or runtime, the latter of which is unfortunately interspersed with the output of the program itself. +Cody later improved the fix to use `gets()` via a macro so that it looks like +the original code. ## [1993/vanb](1993/vanb/vanb.c) ([README.md](1993/vanb/README.md]))