mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 16:09:25 +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/tw9187.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw9190.pp svneol=native#text/plain
|
tests/webtbs/tw9190.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw9209.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/ub1873.pp svneol=native#text/plain
|
||||||
tests/webtbs/ub1883.pp svneol=native#text/plain
|
tests/webtbs/ub1883.pp svneol=native#text/plain
|
||||||
tests/webtbs/uw0555.pp svneol=native#text/plain
|
tests/webtbs/uw0555.pp svneol=native#text/plain
|
||||||
|
@ -984,9 +984,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
{ Force nil termination in case it gets shorter }
|
{ Force nil termination in case it gets shorter }
|
||||||
PWord(Pointer(S)+l*sizeof(WideChar))^:=0;
|
PWord(Pointer(S)+l*sizeof(WideChar))^:=0;
|
||||||
{$ifndef FPC_WINLIKEWIDESTRING}
|
{$ifdef MSWINDOWS}
|
||||||
PWideRec(Pointer(S)-WideFirstOff)^.Len:=l*sizeof(WideChar);
|
if not winwidestringalloc then
|
||||||
{$endif FPC_WINLIKEWIDESTRING}
|
{$endif MSWINDOWS}
|
||||||
|
PWideRec(Pointer(S)-WideFirstOff)^.Len:=l*sizeof(WideChar);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
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