The 'for in' statement lost characters
Original Reporter info from Mantis: tomitomy
-
Reporter name:
Original Reporter info from Mantis: tomitomy
- Reporter name:
Description:
The following code can show the bug.
------------------------------
program Project1;
// Arch Linux, Lazarus 2.0.12, FPC 3.2.0
{$mode objfpc}{$H+}
var
S: String;
begin
for S in ['1234567', '12345678', '123456', '12345678'] do begin
WriteLn(S); // Result: 1234567 1234567 123456 1234567 (missing character 8)
end;
for S in ['12345678', '12345678', '12345678', '12345678'] do begin
WriteLn(S); // Result: 12345678 12345678 12345678 12345678 (all is right)
end;
end.
------------------------------
Forum: https://forum.lazarus.freepascal.org/index.php/topic,54050.0.html
Mantis conversion info:
- Mantis ID: 38732
- OS: Arch Linux
- Platform: Linux
- Version: 3.2.0