From 2ed80eb224d072a8f8ccfb7488eb68bdf8a7cd1b Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 7 Apr 2023 10:33:41 -0700 Subject: [PATCH] Undo no arg check in 2020/burton As part of INABIAF redefinition the check for arg number is removed. Instead the README.md and Makefile warn about it. --- 2020/burton/Makefile | 1 + 2020/burton/README.md | 6 +----- 2020/burton/prog.c | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/2020/burton/Makefile b/2020/burton/Makefile index 879b1c46f..f1f55007e 100644 --- a/2020/burton/Makefile +++ b/2020/burton/Makefile @@ -141,6 +141,7 @@ all: data ${TARGET} supernova deep_magic magic charon pluto ${PROG}: ${PROG}.c + @echo "NOTE: this entry will crash on no arg specified." ${CC} ${CFLAGS} -DB=${B} -DI=${I} -DT=${T} -DS=${S} $< -o $@ ${LIBS} ${PROG}_le: ${PROG}.c diff --git a/2020/burton/README.md b/2020/burton/README.md index 8f8e1b3d1..477110bc1 100644 --- a/2020/burton/README.md +++ b/2020/burton/README.md @@ -16,11 +16,7 @@ make ./prog arg ... ``` -[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) made this entry not -segfault when no arg is specified though he notes that the author says it will -segfault on zero args. He did NOT fix the strange results when more than one arg -is specified. Thank you Cody for your assistance! - +NOTE: this entry will crash on no arg specified. ## Try: diff --git a/2020/burton/prog.c b/2020/burton/prog.c index 67c915521..60be69261 100644 --- a/2020/burton/prog.c +++ b/2020/burton/prog.c @@ -1 +1 @@ -int main(int b,char**i){if(1[i]){long long n=B,a=I^n,r=(a/b&a)>>4,y=atoi(*++i),_=(((a^n/b)*(y>>T)|y>>S)&r)|(a^r);printf("%.8s\n",(char*)&_);}} +int main(int b,char**i){long long n=B,a=I^n,r=(a/b&a)>>4,y=atoi(*++i),_=(((a^n/b)*(y>>T)|y>>S)&r)|(a^r);printf("%.8s\n",(char*)&_);}