Skip to content

Commit 4c99fed

Browse files
authored
Merge pull request #70 from sadeem-albir/patch-11
Fixed minor issue getop.c
2 parents 7a45948 + d2de3d7 commit 4c99fed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapter_5/exercise_5_06/getop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int getop(char *s)
2222
char c;
2323

2424
// Skip blanks (spaces and tabs)
25-
while ((*s = c = getchar()) != ' ' || c != '\t')
25+
while ((*s = c = getchar()) == ' ' || c == '\t')
2626
;
2727

2828
*(s + 1) = '\0';

0 commit comments

Comments
 (0)