浏览代码

* Fixed overflow check for RELOC_RELATIVE_24.

git-svn-id: trunk@11483 -
yury 17 年之前
父节点
当前提交
c92c034882
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/ogcoff.pas

+ 2 - 2
compiler/ogcoff.pas

@@ -841,9 +841,9 @@ const pemagic : array[0..3] of byte = (
               RELOC_RELATIVE_24:
                 begin
                   relocval:=(relocval - mempos - objreloc.dataoffset) shr 2 - 2;
-                  address:=address or relocval and $ffffff;
+                  address:=address or (relocval and $ffffff);
                   relocval:=relocval shr 24;
-                  if (relocval<>$3f) and (relocval<>0) then
+                  if (relocval<>$ff) and (relocval<>0) then
                     internalerror(200606085);  { offset overflow }
                 end;
 {$endif arm}