Browse Source

* Undo latest change

michael 4 years ago
parent
commit
714c373055
1 changed files with 3 additions and 5 deletions
  1. 3 5
      packages/rtl/classes.pas

+ 3 - 5
packages/rtl/classes.pas

@@ -10002,16 +10002,14 @@ var
   Signature: LongInt;
 
 begin
-  FInput.ReadBufferData(Signature);
-  if Signature <> FilerSignatureInt then
-    raise EReadError.Create(SInvalidImage);
   if FIndent = '' then FInDent:='  ';
   If Not Assigned(Input) then
     raise EReadError.Create('Missing input stream');
   If Not Assigned(Output) then
     raise EReadError.Create('Missing output stream');
-  if Input.ReadDWord <> FilerSignatureInt then
-    raise EReadError.Create('Illegal stream image');
+  FInput.ReadBufferData(Signature);
+  if Signature <> FilerSignatureInt then
+    raise EReadError.Create(SInvalidImage);
   ReadObject('');
 end;