summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2019-01-10 10:37:59 +1100
committerJed Barber <jjbarber@y7mail.com>2019-01-10 10:37:59 +1100
commitd13d3d981de2d178b7a27f2b6db78146c9d560ff (patch)
tree32bb7d5c23f65214e48ea38d473334087b0a2ebf /src
parent7009e51c15ed51d716102540d5914e3d14a8a128 (diff)
Minor potential bugfix, now using 'First and 'Last instead of 'Length in a few cases
Diffstat (limited to 'src')
-rw-r--r--src/packrat-errors.adb6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/packrat-errors.adb b/src/packrat-errors.adb
index 62a96a7..82f02f9 100644
--- a/src/packrat-errors.adb
+++ b/src/packrat-errors.adb
@@ -26,7 +26,7 @@ package body Errors is
is
Raw : String := Integer'Image (Num);
begin
- return Raw (1 + 1 .. Raw'Length);
+ return Raw (Raw'First + 1 .. Raw'Last);
end Image;
@@ -188,12 +188,12 @@ package body Errors is
end if;
end;
P_Place := P_Place + 1;
- if P_Place > Check'Length or else not Is_Digit (Check (P_Place)) then
+ if P_Place > Check'Last or else not Is_Digit (Check (P_Place)) then
return False;
end if;
loop
P_Place := P_Place + 1;
- exit when P_Place > Check'Length or else not Is_Digit (Check (P_Place));
+ exit when P_Place > Check'Last or else not Is_Digit (Check (P_Place));
end loop;
S_Place := P_Place;
end loop;