Skip to content

Commit

Permalink
Stop on EOU in skip_nl.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmakarov committed Aug 1, 2023
1 parent 2edb3f5 commit 4ff53b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c2mir/c2mir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2195,7 +2195,7 @@ static void add_include_stream (c2m_ctx_t c2m_ctx, const char *fname, const char
static void skip_nl (c2m_ctx_t c2m_ctx, token_t t,
VARR (token_t) * buffer) { /* skip until new line */
if (t == NULL) t = get_next_pptoken (c2m_ctx);
for (; t->code != '\n'; t = get_next_pptoken (c2m_ctx)) // ??>
for (; t->code != '\n' && t->code != T_EOU; t = get_next_pptoken (c2m_ctx)) // ??>
if (buffer != NULL) VARR_PUSH (token_t, buffer, t);
unget_next_pptoken (c2m_ctx, t);
}
Expand Down

0 comments on commit 4ff53b1

Please sign in to comment.