Explorar el Código

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 hace 6 años
padre
commit
3b49fda0a2
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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;