From 988389a6ea0e644ae3a1b0d0201b9713301ac225 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Sat, 9 Mar 2024 11:46:01 +0300 Subject: [PATCH] extol.c: clear 4 rightmost bits before the loop --- c-programming/jokes/extol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c-programming/jokes/extol.c b/c-programming/jokes/extol.c index 34256ab..22aa094 100644 --- a/c-programming/jokes/extol.c +++ b/c-programming/jokes/extol.c @@ -34,7 +34,7 @@ extol (FILE *f) FILE *fs = fopen ("extol.txt", "a+"); fseek (fs, 0L, SEEK_END); result = extol (fs); - for (result <<= 4; (result & 15) != 15; result++) + for (result <<= 4, result &= ~15; (result & 15) != 15; result++) fputc ('=', fs); result >>= 4; fprintf (fs, "\n");