mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Strip leading white space from message text
This fixes the missing text in #warning and #error messages.
This commit is contained in:
parent
e60f538664
commit
9b717c2e1e
1 changed files with 5 additions and 0 deletions
|
@ -1047,6 +1047,11 @@ static void
|
||||||
user_action (rua_tok_t *tok, rua_loc_t *loc, const char *text, size_t textlen,
|
user_action (rua_tok_t *tok, rua_loc_t *loc, const char *text, size_t textlen,
|
||||||
int state)
|
int state)
|
||||||
{
|
{
|
||||||
|
if (state == TEXT) {
|
||||||
|
while (isspace (*text)) {
|
||||||
|
text++;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (state == COMMENT || state == LCOMMENT || isspace (*text)) {
|
if (state == COMMENT || state == LCOMMENT || isspace (*text)) {
|
||||||
tok->str_text[0] = ' ';
|
tok->str_text[0] = ' ';
|
||||||
tok->str_text[1] = 0;
|
tok->str_text[1] = 0;
|
||||||
|
|
Loading…
Reference in a new issue