* fixed loading widestring constsym values from ppu files (mantis #13583)

* null-terminate loaded ansistring/resourcestring constants from ppu files

git-svn-id: trunk@13033 -
This commit is contained in:
Jonas Maebe 2009-04-24 21:36:01 +00:00
parent f9a17c47bd
commit 37a2cff8fb
4 changed files with 26 additions and 1 deletions

2
.gitattributes vendored
View File

@ -8826,6 +8826,7 @@ tests/webtbs/tw13536.pp svneol=native#text/plain
tests/webtbs/tw13552.pp svneol=native#text/plain
tests/webtbs/tw13553.pp svneol=native#text/plain
tests/webtbs/tw13563.pp svneol=native#text/plain
tests/webtbs/tw13583.pp svneol=native#text/plain
tests/webtbs/tw1364.pp svneol=native#text/plain
tests/webtbs/tw1365.pp svneol=native#text/plain
tests/webtbs/tw1374.pp svneol=native#text/plain
@ -9715,6 +9716,7 @@ tests/webtbs/uw1279.pp svneol=native#text/plain
tests/webtbs/uw13015.pp svneol=native#text/plain
tests/webtbs/uw1331.pp svneol=native#text/plain
tests/webtbs/uw13345y.pp svneol=native#text/plain
tests/webtbs/uw13583.pp svneol=native#text/plain
tests/webtbs/uw2004.inc svneol=native#text/plain
tests/webtbs/uw2040.pp svneol=native#text/plain
tests/webtbs/uw2266a.inc svneol=native#text/plain

View File

@ -1521,7 +1521,7 @@ implementation
begin
initwidestring(pw);
setlengthwidestring(pw,ppufile.getlongint);
ppufile.getdata(pw^.data,pw^.len*sizeof(tcompilerwidechar));
ppufile.getdata(pw^.data^,pw^.len*sizeof(tcompilerwidechar));
pcompilerwidestring(value.valueptr):=pw;
end;
conststring,
@ -1530,6 +1530,7 @@ implementation
value.len:=ppufile.getlongint;
getmem(pc,value.len+1);
ppufile.getdata(pc^,value.len);
pc[value.len]:=#0;
value.valueptr:=pc;
end;
constreal :

8
tests/webtbs/tw13583.pp Normal file
View File

@ -0,0 +1,8 @@
{ %recompile }
uses
uw13583;
begin
writeln(DEFAULT_SIGNATURE);
end.

14
tests/webtbs/uw13583.pp Normal file
View File

@ -0,0 +1,14 @@
unit uw13583;
interface
type
// TEDBString = WideString;
TEDBString = ansiString;
const
DEFAULT_SIGNATURE = TEDBString('edb_signature');
implementation
end.