mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 14:05:58 +02:00
parent
f71c886752
commit
55d6a37865
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -8325,6 +8325,7 @@ tests/webtbs/tw9179.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9187.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9190.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9209.pp svneol=native#text/plain
|
||||
tests/webtbs/tw9221.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1873.pp svneol=native#text/plain
|
||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||
tests/webtbs/uw0555.pp svneol=native#text/plain
|
||||
|
@ -984,9 +984,10 @@ begin
|
||||
end;
|
||||
{ Force nil termination in case it gets shorter }
|
||||
PWord(Pointer(S)+l*sizeof(WideChar))^:=0;
|
||||
{$ifndef FPC_WINLIKEWIDESTRING}
|
||||
PWideRec(Pointer(S)-WideFirstOff)^.Len:=l*sizeof(WideChar);
|
||||
{$endif FPC_WINLIKEWIDESTRING}
|
||||
{$ifdef MSWINDOWS}
|
||||
if not winwidestringalloc then
|
||||
{$endif MSWINDOWS}
|
||||
PWideRec(Pointer(S)-WideFirstOff)^.Len:=l*sizeof(WideChar);
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
13
tests/webtbs/tw9221.pp
Normal file
13
tests/webtbs/tw9221.pp
Normal file
@ -0,0 +1,13 @@
|
||||
{%target=win32,win64}
|
||||
|
||||
var
|
||||
s: widestring;
|
||||
begin
|
||||
winwidestringalloc:=false;
|
||||
s:='1234';
|
||||
SetLength(s, 10);
|
||||
if Length(s) <> 10 then begin
|
||||
writeln('Test failed!');
|
||||
Halt(1);
|
||||
end;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user