Browse Source

* Patch from Werner Pamler to correctly detect endianness. Fixes issue #41332

Michaël Van Canneyt 1 month ago
parent
commit
7fd0c136a2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      packages/fcl-image/src/fpreadtiff.pas

+ 2 - 2
packages/fcl-image/src/fpreadtiff.pas

@@ -634,8 +634,8 @@ begin
   {$endif}
   {$endif}
 
 
   FBigTiff:=false;
   FBigTiff:=false;
-  case TIFHeader.Version of
-  42 : IFDStart:=TIFHeader.IFDStart;
+  case FixEndian(TIFHeader.Version) of
+  42 : IFDStart:=FixEndian(TIFHeader.IFDStart);
   43 : {$ifdef CPU64}
   43 : {$ifdef CPU64}
        begin
        begin
          IFDStart:=ReadQWord;
          IFDStart:=ReadQWord;