wince interface: fixed get text from controls (TEdit) crash (bug #8676) from zaher dirkey

git-svn-id: trunk@10985 -
This commit is contained in:
vincents 2007-04-22 18:11:48 +00:00
parent b8ac959cd9
commit e81129f71b

View File

@ -1130,9 +1130,9 @@ var
begin
TextLen := GetWindowTextLength(AHandle);
tmpWideStr := PWideChar(SysAllocStringLen(nil,TextLen + 1));
GetWindowText(AHandle, PWideChar(tmpWideStr), TextLen + 1);
GetWindowText(AHandle, tmpWideStr, TextLen + 1);
Result := WideStringToString(widestring(tmpWideStr));
FreeMem(tmpWideStr);
SysFreeString(tmpWideStr);
end;