浏览代码

Be sure not to add a symbol with empty name as an alias for function return variable

Pierre Muller 1 年之前
父节点
当前提交
e7f9626592
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      compiler/pparautl.pas

+ 2 - 0
compiler/pparautl.pas

@@ -369,6 +369,8 @@ implementation
                  hs:=pd.resultname^
                else
                  hs:=pd.procsym.name;
+               if (hs='') then
+                 hs:='$_result';
                sl:=tpropaccesslist.create;
                sl.addsym(sl_load,pd.funcretsym);
                aliasvs:=cabsolutevarsym.create_ref(hs,pd.returndef,sl);