From ad9efe502a7d1ecfb9c4cd7a97ae1d501d7beafe Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 7 Apr 2023 10:46:28 -0700 Subject: [PATCH] Undo two checks in 1998/schnitzi As part of the redefinition of INABIAF two segfault fixes were undone. These are noted in the Makefile and README.md file. One fix was necessary and that has been left alone. --- 1998/schnitzi/Makefile | 1 + 1998/schnitzi/README.md | 10 ++++------ 1998/schnitzi/schnitzi.c | 5 ++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/1998/schnitzi/Makefile b/1998/schnitzi/Makefile index 2fc43b251..ea859aa34 100644 --- a/1998/schnitzi/Makefile +++ b/1998/schnitzi/Makefile @@ -130,6 +130,7 @@ all: data ${TARGET} supernova deep_magic magic charon pluto ${PROG}: ${PROG}.c + @echo "NOTE: this program will crash on invalid input." ${CC} ${CFLAGS} $< -o $@ ${LIBS} # alternative executable diff --git a/1998/schnitzi/README.md b/1998/schnitzi/README.md index d29442d0d..39ce33971 100644 --- a/1998/schnitzi/README.md +++ b/1998/schnitzi/README.md @@ -28,12 +28,10 @@ echo 324 >> data ./sort < data -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed three segfaults in -this entry. The first was caused by invalid data types. The second was triggered -if one did not specify any arg. The third happened if the arg was had any -characters that were not the digits 1 - 9 (if it started with 0 it could work as -long as another digit followed it and there were no other non-digits). Thank you -Cody for your assistance! +[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed invalid data +types which prevented this entry from working. There are two other segfaults +that should not be fixed and they are discussed in [bugs.md](/bugs.md). Thank +you Cody for your assistance! NOTE: the larger the number the number of lines of output can become substantially higher as well. Doing `./schnitzi 9` will actually print 771999 diff --git a/1998/schnitzi/schnitzi.c b/1998/schnitzi/schnitzi.c index 02be0399f..1104eeb63 100644 --- a/1998/schnitzi/schnitzi.c +++ b/1998/schnitzi/schnitzi.c @@ -52,6 +52,5 @@ void x_(){ O=g; *r=y[k-2]; _=r; j=o_; } void d (){ O=g; *r=y[k]; _=r; k=k+1; m=k