aboutsummaryrefslogtreecommitdiff
path: root/miscutils/bc.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/bc.c')
-rw-r--r--miscutils/bc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index a271a2040..5938e54ab 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -2790,9 +2790,13 @@ static void bc_lex_lineComment(BcLex *l)
static void bc_lex_whitespace(BcLex *l)
{
- char c;
l->t.t = BC_LEX_WHITESPACE;
- for (c = l->buf[l->i]; c != '\n' && isspace(c); c = l->buf[++l->i]);
+ for (;;) {
+ char c = l->buf[l->i];
+ if (c == '\n' || !isspace(c))
+ break;
+ l->i++;
+ }
}
static BC_STATUS zbc_lex_number(BcLex *l, char start)