ソースを参照

Avoid referencing an empty ansistring in tai_stabs.create_ansistr

git-svn-id: trunk@28990 -
pierre 10 年 前
コミット
0d9783e9a6
1 ファイル変更4 行追加1 行削除
  1. 4 1
      compiler/aasmtai.pas

+ 4 - 1
compiler/aasmtai.pas

@@ -2187,7 +2187,10 @@ implementation
          typ:=ait_stab;
          stabtype:=_stabtype;
          getmem(str,length(s)+1);
-         move(s[1],str^,length(s)+1);
+         if length(s)>0 then
+           move(s[1],str^,length(s)+1)
+         else
+           str^:=#0;
       end;
 
     destructor tai_stab.destroy;