mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 23:51:34 +01:00
fcl-db: when moving odd number bytes from blob stream into widestring allocate sufficient space. (f.e. if Len=1 then Len div 2 = 0)
git-svn-id: trunk@22995 -
This commit is contained in:
parent
e370303fda
commit
ffefefc1dc
@ -2729,7 +2729,7 @@ begin
|
|||||||
With Stream do
|
With Stream do
|
||||||
try
|
try
|
||||||
Len := Size;
|
Len := Size;
|
||||||
SetLength(Result,Len div 2);
|
SetLength(Result, (Len+1) div 2);
|
||||||
if Len > 0 then
|
if Len > 0 then
|
||||||
ReadBuffer(Result[1] ,Len);
|
ReadBuffer(Result[1] ,Len);
|
||||||
finally
|
finally
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user