From d8cb29f6e0cb6ec08d40b2aefe6e83e064ced707 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 14 Mar 2021 10:03:08 +0000 Subject: [PATCH] Fix bug in preprocessor line directive handling. --- ivlpp/lexor.lex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ivlpp/lexor.lex b/ivlpp/lexor.lex index 5160f2e38..404ebe941 100644 --- a/ivlpp/lexor.lex +++ b/ivlpp/lexor.lex @@ -777,7 +777,7 @@ static void handle_line_directive(void) will underflow on line 1, but that's OK because we are using unsigned arithmetic. */ assert(istack); - realloc(istack->path, fn_end-fn_start+1); + istack->path = realloc(istack->path, fn_end-fn_start+1); strncpy(istack->path, fn_start, fn_end-fn_start); istack->path[fn_end-fn_start] = '\0'; istack->lineno = lineno - 2;