diff options
Diffstat (limited to 'gcc/ada/a-strsea.adb')
-rw-r--r-- | gcc/ada/a-strsea.adb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/ada/a-strsea.adb b/gcc/ada/a-strsea.adb index dbeb0e4..d689833 100644 --- a/gcc/ada/a-strsea.adb +++ b/gcc/ada/a-strsea.adb @@ -238,7 +238,7 @@ package body Ada.Strings.Search is Mapping : Maps.Character_Mapping := Maps.Identity) return Natural is PL1 : constant Integer := Pattern'Length - 1; - Ind : Natural; + Ind : Integer; -- can be negative if Pattern'Length > Source'Length Cur : Natural; begin @@ -246,12 +246,6 @@ package body Ada.Strings.Search is raise Pattern_Error; end if; - -- If Pattern longer than Source it can't be found - - if Pattern'Length > Source'Length then - return 0; - end if; - -- Forwards case if Going = Forward then |