From 25535d0efd18a9558fbde52ba88ce13525705472 Mon Sep 17 00:00:00 2001 From: charlet Date: Thu, 25 Jun 2009 08:42:46 +0000 Subject: 2009-06-25 Pascal Obry * sem_ch4.adb: Minor reformatting. * a-strsea.adb: Fix confusion between 'Length and 'Last. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148933 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/a-strsea.adb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'gcc/ada/a-strsea.adb') diff --git a/gcc/ada/a-strsea.adb b/gcc/ada/a-strsea.adb index 199474542f3..a9093ed3bd7 100644 --- a/gcc/ada/a-strsea.adb +++ b/gcc/ada/a-strsea.adb @@ -94,8 +94,7 @@ package body Ada.Strings.Search is -- Unmapped case if Mapping'Address = Maps.Identity'Address then - Ind := Source'First; - while Ind <= Source'Length - PL1 loop + while Ind <= Source'Last - PL1 loop if Pattern = Source (Ind .. Ind + PL1) then Num := Num + 1; Ind := Ind + Pattern'Length; @@ -107,8 +106,7 @@ package body Ada.Strings.Search is -- Mapped case else - Ind := Source'First; - while Ind <= Source'Length - PL1 loop + while Ind <= Source'Last - PL1 loop Cur := Ind; for K in Pattern'Range loop if Pattern (K) /= Value (Mapping, Source (Cur)) then -- cgit v1.2.1