diff options
Diffstat (limited to 'gcc/ada/a-stwise.adb')
-rw-r--r-- | gcc/ada/a-stwise.adb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/ada/a-stwise.adb b/gcc/ada/a-stwise.adb index 852b781233f..c5fb0be9abf 100644 --- a/gcc/ada/a-stwise.adb +++ b/gcc/ada/a-stwise.adb @@ -233,7 +233,7 @@ package body Ada.Strings.Wide_Search is return Natural is PL1 : constant Integer := Pattern'Length - 1; - Ind : Natural; + Ind : Integer; -- can be negative if Pattern'Length > Source'Length Cur : Natural; begin @@ -241,12 +241,6 @@ package body Ada.Strings.Wide_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 |