From 25c081a66f83e16695086261cbf6a22c63e338fe Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Sat, 25 Nov 2023 06:09:44 -0800 Subject: [PATCH] Change argc to int in 1990/westley --- 1990/westley/westley.c | 2 +- thanks-for-fixes.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/1990/westley/westley.c b/1990/westley/westley.c index 5362c1eb8..635e8aa44 100644 --- a/1990/westley/westley.c +++ b/1990/westley/westley.c @@ -4,7 +4,7 @@ char*lie; not; int rested, get, out; - main(ly, die) char ly, **die ;{ + main(ly, die) int ly; char **die ;{ signed char lotte, diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 837cc35a2..5c4d89606 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -1038,6 +1038,9 @@ was changed to just `1`. Since it's instructional to see the differences he has provided an alternate version, [westley.alt.c](1990/westley/westley.alt.c), which is the original code. +He also changed the `argc` to be an `int`, not a `char`, even though it might +often be the same (for the purpose of `clang`?). + He also fixed the code to not enter an infinite loop if arg is a number not > 0 and to not crash if no arg is specified.