瀏覽代碼

Always use phdr if found_addr is still -1

Pierre Muller 1 月之前
父節點
當前提交
a359c7b4a8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      rtl/inc/exeinfo.pp

+ 1 - 1
rtl/inc/exeinfo.pp

@@ -1013,7 +1013,7 @@ begin
           end;
       end;
 
-    if ((found_addr=ptruint(-1)) or (found_addr < ptruint(phdr))) and (ptruint(phdr)<ptruint(addr)) then
+    if (found_addr=ptruint(-1)) or ((found_addr < ptruint(phdr)) and (ptruint(phdr)<ptruint(addr))) then
       found_addr:=ptruint(phdr);
     { Set pagesize to a default small value }
     if (pagesize=ptruint(-1)) then