* initialise for-loop variables before the loop

o the intiialization code of a for-loop used to do that, but no longer
     does so since their automatic transformation to a while-loop. Even
     though the code did not read the value of the for-loop variable
     in case the loop was not entered, the JVM's verifier is not
     sophisticated enough to be able to detect that (it's protected by
     a boolean set in the loop)

git-svn-id: trunk@34858 -
This commit is contained in:
Jonas Maebe 2016-11-09 19:51:39 +00:00
parent 86876ed114
commit 1ac51d5cd1
2 changed files with 2 additions and 0 deletions

View File

@ -384,6 +384,7 @@ begin
if (zerobased) then
begin
foundnull:=false;
i:=0;
for i:=low(arr) to high(arr) do
if arr[i]=#0 then
begin

View File

@ -388,6 +388,7 @@ begin
if zerobased then
begin
foundnull:=false;
index:=0;
for index:=low(arr) to l-1 do
if arr[index]=#0 then
begin