diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-25 08:42:46 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-25 08:42:46 +0000 |
commit | 25535d0efd18a9558fbde52ba88ce13525705472 (patch) | |
tree | 934f87de4f148196a58fc456d95045d8fa35b2a5 /gcc/ada/a-strsea.adb | |
parent | d8d8b098db921d587514077c49a920e1e85cd179 (diff) | |
download | gcc-25535d0efd18a9558fbde52ba88ce13525705472.tar.gz |
2009-06-25 Pascal Obry <obry@adacore.com>
* 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
Diffstat (limited to 'gcc/ada/a-strsea.adb')
-rw-r--r-- | gcc/ada/a-strsea.adb | 6 |
1 files changed, 2 insertions, 4 deletions
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 |