Skip to content

Commit e0e29f9

Browse files
committed
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
1 parent 2939897 commit e0e29f9

File tree

1 file changed

+1
-1
lines changed
  • usr.bin/calendar

1 file changed

+1
-1
lines changed

usr.bin/calendar/io.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ token(char *line, FILE *out, bool *skip)
213213
}
214214

215215
if (strncmp(line, "ifdef", 5) == 0) {
216-
walk = line + 6;
216+
walk = line + 5;
217217
trimlr(&walk);
218218

219219
if (*walk == '\0') {

0 commit comments

Comments
 (0)