fpc/tests/test/units/sysutils/twstralloc.pp
Jonas Maebe 2b210335a1 * fixed pointer arithmetic errors in WideStrAlloc/StrBufSize/StrDispose
(patch by Iks, mantis #29710)

git-svn-id: trunk@33271 -
2016-03-18 13:12:11 +00:00

15 lines
159 B
ObjectPascal

{ %opt=-g-h }
uses
sysutils;
var
pw: pwidechar;
begin
pw:=widestralloc(1);
pw^:='a';
if StrBufSize(pw)<>2 then
halt(1);
StrDispose(pw);
end.