Debugger handles strings as 0-based, while they are 1-based. Leading to wrong char being displayed
Original Reporter info from Mantis: ggeldenhuys
-
Reporter name: Graeme Geldenhuys
Original Reporter info from Mantis: ggeldenhuys
- Reporter name: Graeme Geldenhuys
Description:
If we can't trust the debugger output, what can we trust?
See the attached images. They show tooltip debug information while I debugged the following simple application.
--------------------------------
program project1;
{$mode objfpc}{$H+}
uses
Classes;
var
s: string;
c: char;
begin
s := 'hello';
c := s[1];
writeln(c);
writeln(s[1]);
end.
--------------------------------
Mantis conversion info:
- Mantis ID: 17619
- OS: Ubuntu Linux
- OS Build: 10.04
- Platform: x86_64
- Version: 0.9.29 (SVN)
- Fixed in version: 1.0.0
- Fixed in revision: 33517 (#e2a50e02)
- Monitored by: » etrusco (Flávio Etrusco), » @martin_frb (Martin Friebe)
- Target version: 0.99.0