Browse Source

pas2js: fixed setlength(a,0)

mattias 5 years ago
parent
commit
e53b5ee554
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/utils/pas2js/dist/rtl.js

+ 1 - 1
compiler/utils/pas2js/dist/rtl.js

@@ -843,7 +843,7 @@ var rtl = {
           for (var i=0; i<lastlen; i++)
             a[i]=(i<oldlen)?src[i]:defaultvalue;
         }
-        while ((depth>0) && (stack[depth-1].i===stack[depth-1].dim)){
+        while ((depth>0) && (stack[depth-1].i>=stack[depth-1].dim)){
           depth--;
         };
         if (depth===0){