Explorar o código

Avoid referencing an empty ansistring in tai_stabs.create_ansistr

git-svn-id: trunk@28990 -
pierre %!s(int64=10) %!d(string=hai) anos
pai
achega
0d9783e9a6
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  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;