From d13d3d981de2d178b7a27f2b6db78146c9d560ff Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Thu, 10 Jan 2019 10:37:59 +1100 Subject: Minor potential bugfix, now using 'First and 'Last instead of 'Length in a few cases --- src/packrat-errors.adb | 6 +++--- 1 file 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; -- cgit