mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +02:00
* 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:
parent
86876ed114
commit
1ac51d5cd1
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user