Browse Source

* Reset position after internalcheck

git-svn-id: trunk@33466 -
michael 9 years ago
parent
commit
2d68132812
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/fcl-image/src/fphandler.inc

+ 3 - 0
packages/fcl-image/src/fphandler.inc

@@ -239,13 +239,16 @@ end;
 
 function TFPCustomImageReader.CheckContents (Str:TStream) : boolean;
 var InRead : boolean;
+    P : Int64;
 begin
   InRead := assigned(FStream);
   if not assigned(Str) then
     raise FPImageException.Create(ErrorText[StrNoStream]);
   try
     FSTream := Str;
+    P:=Str.Position;
     result := InternalCheck (Str);
+    Str.Position:=P;
   finally
     if not InRead then
       FStream := nil;