From e0e29f9425bd15e70c0abb4a6a41c12c49271d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Wed, 28 Oct 2020 13:30:24 +0000 Subject: [PATCH] Fix off-by-one error in processing of #ifdef lines The convention in this program is to parse the line immediately starting after the token (e.g. #defineA and #ifdefA define respectively look-up "A"), and this commit restores this behavior instead of skipping an assumed white-space character following #ifdef. Reported by: kevans MFC after: 3 days --- usr.bin/calendar/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 824ea67f9f0e..25cf9b5d451a 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -213,7 +213,7 @@ token(char *line, FILE *out, bool *skip) } if (strncmp(line, "ifdef", 5) == 0) { - walk = line + 6; + walk = line + 5; trimlr(&walk); if (*walk == '\0') {