diff --git a/2020/burton/README.md b/2020/burton/README.md index d7800de98..391b014ad 100644 --- a/2020/burton/README.md +++ b/2020/burton/README.md @@ -1,8 +1,8 @@ # Best one-liner -Dave Burton - -Twitter: @lv2jmp + Dave Burton + + Twitter: @lv2jmp ## To build: @@ -16,7 +16,11 @@ make ./prog arg ... ``` -NOTE: this entry will dump core if you do not specify an argument. +[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! + ## Try: diff --git a/2020/burton/prog.c b/2020/burton/prog.c index 60be69261..67c915521 100644 --- a/2020/burton/prog.c +++ b/2020/burton/prog.c @@ -1 +1 @@ -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*)&_);} +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*)&_);}}