瀏覽代碼

* set size of nil constants casted to method pointers correctly, first part of resolving #10684

git-svn-id: trunk@12827 -
florian 16 年之前
父節點
當前提交
cc622779c9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/ncgcnv.pas

+ 1 - 1
compiler/ncgcnv.pas

@@ -375,7 +375,7 @@ interface
 
 
     begin
     begin
       tg.gettemp(current_asmdata.currasmlist,2*sizeof(puint),sizeof(puint),tt_normal,r);
       tg.gettemp(current_asmdata.currasmlist,2*sizeof(puint),sizeof(puint),tt_normal,r);
-      location_reset_ref(location,LOC_REFERENCE,OS_NO,0);
+      location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),0);
       location.reference:=r;
       location.reference:=r;
       cg.a_load_const_ref(current_asmdata.currasmlist,OS_ADDR,0,r);
       cg.a_load_const_ref(current_asmdata.currasmlist,OS_ADDR,0,r);
       inc(r.offset,sizeof(puint));
       inc(r.offset,sizeof(puint));