mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-12-18 00:11:06 +00:00
Enforce a trailing nul-byte after preprocessing
This commit is contained in:
parent
85e98e9f53
commit
58c87ac328
1 changed files with 4 additions and 0 deletions
4
ftepp.c
4
ftepp.c
|
@ -1236,6 +1236,10 @@ static bool ftepp_preprocess(ftepp_t *ftepp)
|
||||||
}
|
}
|
||||||
} while (!ftepp->errors && ftepp->token < TOKEN_EOF);
|
} while (!ftepp->errors && ftepp->token < TOKEN_EOF);
|
||||||
|
|
||||||
|
/* force a 0 at the end but don't count it as added to the output */
|
||||||
|
vec_push(ftepp->output_string, 0);
|
||||||
|
vec_shrinkby(ftepp->output_string, 1);
|
||||||
|
|
||||||
newline = ftepp->token == TOKEN_EOF;
|
newline = ftepp->token == TOKEN_EOF;
|
||||||
return newline;
|
return newline;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue