Skip to content

Commit d8cb29f

Browse files
Fix bug in preprocessor line directive handling.
1 parent 9a2c43e commit d8cb29f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ivlpp/lexor.lex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ static void handle_line_directive(void)
777777
will underflow on line 1, but that's OK because we are using
778778
unsigned arithmetic. */
779779
assert(istack);
780-
realloc(istack->path, fn_end-fn_start+1);
780+
istack->path = realloc(istack->path, fn_end-fn_start+1);
781781
strncpy(istack->path, fn_start, fn_end-fn_start);
782782
istack->path[fn_end-fn_start] = '\0';
783783
istack->lineno = lineno - 2;

0 commit comments

Comments
 (0)