Browse Source

* null-terminate tai_strings loaded from ppus

git-svn-id: branches/hlcgllvm@28133 -
Jonas Maebe 11 years ago
parent
commit
23f34608ed
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/aasmtai.pas

+ 2 - 1
compiler/aasmtai.pas

@@ -2057,8 +2057,9 @@ implementation
       begin
       begin
         inherited ppuload(t,ppufile);
         inherited ppuload(t,ppufile);
         len:=ppufile.getlongint;
         len:=ppufile.getlongint;
-        getmem(str,len);
+        getmem(str,len+1);
         ppufile.getdata(str^,len);
         ppufile.getdata(str^,len);
+        str[len]:=#0
       end;
       end;