Browse Source

* fix loading of i8086-msdos ELF when the MZ binary in front of it exceeds 64kb

git-svn-id: trunk@39069 -
nickysn 7 năm trước cách đây
mục cha
commit
a598e17c8a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      rtl/inc/exeinfo.pp

+ 1 - 1
rtl/inc/exeinfo.pp

@@ -973,7 +973,7 @@ begin
    Exit;
    Exit;
   if DosHeader.E_Magic = $5A4D then
   if DosHeader.E_Magic = $5A4D then
   begin
   begin
-   E.ImgOffset := DosHeader.e_cp * ParagraphSize;
+   E.ImgOffset := LongWord(DosHeader.e_cp) * ParagraphSize;
    if DosHeader.e_cblp > 0 then
    if DosHeader.e_cblp > 0 then
     E.ImgOffset := E.ImgOffset + DosHeader.e_cblp - ParagraphSize;
     E.ImgOffset := E.ImgOffset + DosHeader.e_cblp - ParagraphSize;
   end;
   end;