From d0fd412c031bbe21792b5a28d918da397d707f2d Mon Sep 17 00:00:00 2001 From: "rosenfield.albert" Date: Wed, 25 Jun 2008 13:00:04 +0000 Subject: [PATCH] * Bugfix: Correct cast when retrieving wide data from buffer is PWideChar. * Bugfix: FBlobSize is in bytes, SetString expects a character count. --- components/zeosdbo/src/dbc/ZDbcResultSet.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/zeosdbo/src/dbc/ZDbcResultSet.pas b/components/zeosdbo/src/dbc/ZDbcResultSet.pas index ad3766d3..3306fd15 100644 --- a/components/zeosdbo/src/dbc/ZDbcResultSet.pas +++ b/components/zeosdbo/src/dbc/ZDbcResultSet.pas @@ -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;