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