* Bugfix: Correct cast when retrieving wide data from buffer is PWideChar.

* Bugfix: FBlobSize is in bytes, SetString expects a character count.
This commit is contained in:
rosenfield.albert
2008-06-25 13:00:04 +00:00
parent 8f5cc1ac3c
commit d0fd412c03

View File

@@ -2835,7 +2835,7 @@ begin
//Result := GetString;
if (FBlobSize > 0) and Assigned(FBlobData) then
// Note: SetString has a WideString overload. There is no SetWideString.
System.SetString(Result, PChar(FBlobData), FBlobSize)
System.SetString(Result, PWideChar(FBlobData), FBlobSize div 2)
else Result := '';
end;