Range check errors with zero length array
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
-
Reporter name: Alfred
Original Reporter info from Mantis: DonAlfredo @DonAlfredo
- Reporter name: Alfred
Description:
Many tests of SynEdit error out with a range check error.
Seems that a zero length string array causes these errors.
Steps to reproduce:
program project6;
function LinesToText(Lines: array of String): String;
begin
end;
var
SomeLines: array of String;
begin
SetLength(SomeLines,1);
LinesToText(SomeLines); // <-- ok
SetLength(SomeLines,0);
LinesToText(SomeLines); // <-- range error
readln;
end.
Additional information:
Thanks for solving 29933 !
Added assembler.
Mantis conversion info:
- Mantis ID: 30007
- OS: Linux
- OS Build: Linux Aarch64
- Build: REV 33498
- Platform: Odroid-C2
- Version: 3.1.1
- Fixed in version: 3.1.1
- Fixed in revision: 33595 (#130d9fee)