瀏覽代碼

* only coerce the type of the leftover bytes of a record if the location
size doesn't match the number of remaining bytes
o prevents a second "single" field of a record getting interpreted as a
"cardinal"

git-svn-id: trunk@40569 -

Jonas Maebe 6 年之前
父節點
當前提交
93e39fb0cd
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      compiler/llvm/llvmdef.pas

+ 5 - 3
compiler/llvm/llvmdef.pas

@@ -951,7 +951,7 @@ implementation
               retdeflist[i]:=retloc^.def;
               dec(sizeleft,retloc^.def.size);
             end
-          else
+          else if retloc^.def.size<>sizeleft then
             begin
               case sizeleft of
                 1:
@@ -970,8 +970,10 @@ implementation
                   retdeflist[i]:=u56inttype;
                 else
                   retdeflist[i]:=retloc^.def;
-              end;
-            end;
+              end
+            end
+          else
+            retdeflist[i]:=retloc^.def;
           inc(i);
           retloc:=retloc^.next;
         until not assigned(retloc);