瀏覽代碼

* Fixed internal error 200411013 when typecasting and dereferencing nil into an array

J. Gareth "Curious Kit" Moreton 4 月之前
父節點
當前提交
2b9455e262
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      compiler/ncgmem.pas

+ 4 - 0
compiler/ncgmem.pas

@@ -974,6 +974,10 @@ implementation
                    hlcg.location_force_mem(current_asmdata.CurrAsmList,left.location,left.resultdef);
                    hlcg.location_force_mem(current_asmdata.CurrAsmList,left.location,left.resultdef);
                    location_copy(location,left.location);
                    location_copy(location,left.location);
                  end;
                  end;
+               LOC_CONSTANT:  { Usually 'nil' }
+                 begin
+                   hlcg.reference_reset_base(location.reference,left.resultdef,NR_NO,left.location.value,ctempposinvalid,location.reference.alignment,[]);
+                 end;
                LOC_INVALID:
                LOC_INVALID:
                  Internalerror(2019061101);
                  Internalerror(2019061101);
                else
                else