position was not found if source file length was even.

This commit is contained in:
Basile Burg 2014-08-08 17:15:25 +02:00
parent 943332913b
commit 94b8194f85
1 changed files with 2 additions and 3 deletions

View File

@ -488,10 +488,9 @@ begin
result.x := 0; result.x := 0;
result.y := 0; result.y := 0;
ident := ''; ident := '';
i := 0; i := 1;
while (true) do while (true) do
begin begin
inc(i);
if i > length(aMessage) then exit; if i > length(aMessage) then exit;
if aMessage[i] = '.' then if aMessage[i] = '.' then
begin begin
@ -513,7 +512,7 @@ begin
end; end;
if aMessage[i] = ')' then if aMessage[i] = ')' then
begin begin
result.y := strToInt(ident); result.y := strToIntDef(ident, -1);
exit; exit;
end; end;
end; end;