diff options
-rw-r--r-- | translate/grt/grt-options.adb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/translate/grt/grt-options.adb b/translate/grt/grt-options.adb index 6d73843..138c31d 100644 --- a/translate/grt/grt-options.adb +++ b/translate/grt/grt-options.adb @@ -217,7 +217,12 @@ package body Grt.Options is end if; if Pos > Str'Last then -- No suffix. - return Natural (Val); + if Val > Integer_64(Natural'Last) then + Error_C ("Size exceeds limit for option "); + Error_E (Option_Name); + else + return Natural (Val); + end if; end if; if Pos = Str'Last or else (Pos + 1 = Str'Last |