a-stwise.adb, [...]: Fix confusion between 'Length and 'Last.

2009-06-25  Pascal Obry  <obry@adacore.com>

	* a-stwise.adb, a-stzsea.adb: Fix confusion between 'Length and 'Last.

From-SVN: r148935
This commit is contained in:
Pascal Obry 2009-06-25 09:04:31 +00:00 committed by Arnaud Charlet
parent 1d24fc5e45
commit a2b62f99d5
3 changed files with 8 additions and 8 deletions

View File

@ -1,3 +1,7 @@
2009-06-25 Pascal Obry <obry@adacore.com>
* a-stwise.adb, a-stzsea.adb: Fix confusion between 'Length and 'Last.
2009-06-25 Emmanuel Briot <briot@adacore.com>
* fmap.ads, make.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb,

View File

@ -88,8 +88,7 @@ package body Ada.Strings.Wide_Search is
-- Unmapped case
if Mapping'Address = Wide_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;
@ -101,8 +100,7 @@ package body Ada.Strings.Wide_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

View File

@ -90,8 +90,7 @@ package body Ada.Strings.Wide_Wide_Search is
-- Unmapped case
if Mapping'Address = Wide_Wide_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;
@ -103,8 +102,7 @@ package body Ada.Strings.Wide_Wide_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