Browse Source

* don't assume stream is at position=0 mantis #0037332

git-svn-id: trunk@45776 -
marco 5 năm trước cách đây
mục cha
commit
515b92263f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      packages/fcl-json/src/jsonscanner.pp

+ 1 - 1
packages/fcl-json/src/jsonscanner.pp

@@ -146,7 +146,7 @@ Var
 
 begin
   S:='';
-  SetLength(S,Source.Size);
+  SetLength(S,Source.Size-Source.Position);
   if Length(S)>0 then
     Source.ReadBuffer(S[1],Length(S));
   Create(S,AOptions)