[qfcc] Strip leading white space from message text

This fixes the missing text in #warning and #error messages.
This commit is contained in:
Bill Currie 2023-10-24 22:18:23 +09:00
parent e60f538664
commit 9b717c2e1e

View file

@ -1047,6 +1047,11 @@ static void
user_action (rua_tok_t *tok, rua_loc_t *loc, const char *text, size_t textlen,
int state)
{
if (state == TEXT) {
while (isspace (*text)) {
text++;
}
}
if (state == COMMENT || state == LCOMMENT || isspace (*text)) {
tok->str_text[0] = ' ';
tok->str_text[1] = 0;