Explorar o código

* Reset position after internalcheck

git-svn-id: trunk@33466 -
michael %!s(int64=9) %!d(string=hai) anos
pai
achega
2d68132812
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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;