Fix bug in preprocessor line directive handling.
This commit is contained in:
parent
9a2c43ec34
commit
d8cb29f6e0
|
|
@ -777,7 +777,7 @@ static void handle_line_directive(void)
|
||||||
will underflow on line 1, but that's OK because we are using
|
will underflow on line 1, but that's OK because we are using
|
||||||
unsigned arithmetic. */
|
unsigned arithmetic. */
|
||||||
assert(istack);
|
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);
|
strncpy(istack->path, fn_start, fn_end-fn_start);
|
||||||
istack->path[fn_end-fn_start] = '\0';
|
istack->path[fn_end-fn_start] = '\0';
|
||||||
istack->lineno = lineno - 2;
|
istack->lineno = lineno - 2;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue