Fix line numbers when parsing multi-line macros.

This commit is contained in:
Jordan Bancino 2023-04-29 15:16:58 +00:00
parent 2d8d5244c4
commit a3cc06ff2a

View file

@ -396,17 +396,18 @@ HeaderParse(Stream * stream, HeaderExpr * expr)
return; return;
} }
if (c == '\n' && pC != '\\') if (c == '\n')
{
expr->state.lineNo++;
if (pC != '\\')
{ {
expr->data.text[i] = '\0'; expr->data.text[i] = '\0';
expr->state.lineNo++;
break; break;
} }
else }
{
expr->data.text[i] = c; expr->data.text[i] = c;
i++; i++;
}
pC = c; pC = c;
} }