From 87538f29f205b43b529540566f25829eb508e393 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 9 Mar 2003 00:40:26 -0500 Subject: [PATCH] Don Knuth's second round of patches. --- NEWS | 4 ++++ cesspool.c | 2 +- perpetrate.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index dd5c84d..701ccbf 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,9 @@ NEW IN THIS RELEASE + Release 0.23 (by Eric S. Raymond) 4 Mar 2003 + +1. More fixes by Don Knith. He found a bug in the type-propagation logic. + Release 0.22 (by Eric S. Raymond) 4 Mar 2003 1. Incorporated a minor fix patch from Donald Knuth. Yes, *the* diff --git a/cesspool.c b/cesspool.c index aebea9a..d21515e 100644 --- a/cesspool.c +++ b/cesspool.c @@ -98,7 +98,7 @@ unsigned int pin(void) if (fgets(buf, BUFSIZ, stdin) == (char *)NULL) lose(E562, lineno, (char *)NULL); n = strlen(buf) - 1; - if (buf[n-1] == '\r') + if (n > 0 && buf[n-1] == '\r') --n; buf[n] = '\0'; diff --git a/perpetrate.c b/perpetrate.c index a92c424..551f9c2 100644 --- a/perpetrate.c +++ b/perpetrate.c @@ -310,6 +310,7 @@ int main(int argc, char *argv[]) */ for (tp = tuples; tp->type; tp++) if (tp->type == GETS || tp->type == RESIZE + || tp->type == WRITE_IN || tp->type == READ_OUT || tp->type == FORGET || tp->type == RESUME) typecast(tp->u.node); -- 2.43.0