浏览代码

* Reset position after internalcheck

git-svn-id: trunk@33466 -
michael 9 年之前
父节点
当前提交
2d68132812
共有 1 个文件被更改,包括 3 次插入0 次删除
  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;