Преглед изворни кода

Only call moved if len>0, as otherwise astring local variable is nil, which leads to a range check error for astring[1]

git-svn-id: trunk@40132 -
pierre пре 6 година
родитељ
комит
3b49fda0a2
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      compiler/utils/ppuutils/ppudump.pp

+ 2 - 1
compiler/utils/ppuutils/ppudump.pp

@@ -1820,7 +1820,8 @@ begin
               begin
                 len:=gettokenbufsizeint;
                 setlength(astring,len);
-                move(tokenbuf[tbi],astring[1],len);
+                if len>0 then
+                  move(tokenbuf[tbi],astring[1],len);
                 write([' ',astring]);
                 inc(tbi,len);
               end;