Skip to content

Commit 38f6e2c

Browse files
Assert for avoidance of undefined behaviour
1 parent 1756ffd commit 38f6e2c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Parser/tokenizer.c

+1
Original file line numberDiff line numberDiff line change
@@ -1533,6 +1533,7 @@ tok_get(struct tok_state *tok, const char **p_start, const char **p_end)
15331533
} while (c == ' ' || c == '\t' || c == '\014');
15341534

15351535
/* Set start of current token */
1536+
assert(tok->cur != NULL);
15361537
tok->start = tok->cur - 1;
15371538

15381539
/* Skip comment, unless it's a type comment */

0 commit comments

Comments
 (0)