Browse Source

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

git-svn-id: trunk@45776 -
marco 5 years ago
parent
commit
515b92263f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/fcl-json/src/jsonscanner.pp

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

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