浏览代码

* clear optinfo after allocating it

git-svn-id: trunk@24898 -
florian 12 年之前
父节点
当前提交
3016d48521
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      compiler/node.pas

+ 4 - 1
compiler/node.pas

@@ -967,7 +967,10 @@ implementation
     function tnode.allocoptinfo : poptinfo;inline;
       begin
         if not(assigned(optinfo)) then
-          new(optinfo);
+          begin
+            new(optinfo);
+            fillchar(optinfo^,sizeof(optinfo^),0);
+          end;
         result:=optinfo;
       end;