fixed TWin32MemoStrings.Get (issue #7208)

git-svn-id: trunk@9737 -
This commit is contained in:
vincents 2006-08-20 20:05:19 +00:00
parent 9f19bda8e3
commit 7c5dc01b02

View File

@ -76,9 +76,9 @@ begin
// no need for temp buf and moving
// the result is without null terminator.
PWord(@Result[1])^ := len;
len := SendMessage(fHandle, EM_GETLINE, Index, lparam(@Result[1]));
// readjust length in case somethng went wrong
PWord(@Result[1])^ := len+1;
len := SendMessage(fHandle, EM_GETLINE, Index, lparam(pchar(Result)));
// readjust length in case something went wrong
Setlength(Result, len);
end;