Make 1993/schnitzi use fgets() not gets()

This commit is contained in:
Cody Boone Ferguson committed 2023-03-23 17:36:56 -07:00
1 parent 9a388bcf6f
commit b34b47c2f2
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -9,6 +9,9 @@
make all
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made this use `fgets()`
not `gets()` to make it safer. Thank you Cody for your assistance!
### To run
./schnitzi file
+1 -1
View File
@@ -30,6 +30,6 @@
) printf ( " %s",li1[l1l++] ) ;puts
( "." ) ;}}else{sprintf ( il1,"cat %s;echo",lll[1]
) ;system ( il1 ) ;}printf
( "\n? " ) ;gets ( il1
( "\n? " ) ; fgets ( il1, 111 , stdin
) ;sprintf ( i1l,"%s %s %s",lll[!1 ] ,lll[1],il1);system
( i1l); }