Fix bug where globals or static variables initialized using pointer arithmetic on string constants could get the wrong value.

This fixes the compca16.c test case.
This commit is contained in:
Stephen Heumann 2015-12-29 00:33:32 -06:00
parent 0df71da4f1
commit 8e7f46dc99
1 changed files with 1 additions and 1 deletions

View File

@ -2035,7 +2035,7 @@ var
end {else if}
else if kind = stringConst then begin
iPtr^.pval := offset;
iPtr^.pPlus := operator = plusch;
iPtr^.pPlus := true;
iPtr^.isName := false;
iPtr^.pStr := tree^.token.sval;
end {else if}