Commit a2b62f99 by Pascal Obry Committed by Arnaud Charlet

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
parent 1d24fc5e
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> 2009-06-25 Emmanuel Briot <briot@adacore.com>
* fmap.ads, make.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb, * fmap.ads, make.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb,
......
...@@ -88,8 +88,7 @@ package body Ada.Strings.Wide_Search is ...@@ -88,8 +88,7 @@ package body Ada.Strings.Wide_Search is
-- Unmapped case -- Unmapped case
if Mapping'Address = Wide_Maps.Identity'Address then if Mapping'Address = Wide_Maps.Identity'Address then
Ind := Source'First; while Ind <= Source'Last - PL1 loop
while Ind <= Source'Length - PL1 loop
if Pattern = Source (Ind .. Ind + PL1) then if Pattern = Source (Ind .. Ind + PL1) then
Num := Num + 1; Num := Num + 1;
Ind := Ind + Pattern'Length; Ind := Ind + Pattern'Length;
...@@ -101,8 +100,7 @@ package body Ada.Strings.Wide_Search is ...@@ -101,8 +100,7 @@ package body Ada.Strings.Wide_Search is
-- Mapped case -- Mapped case
else else
Ind := Source'First; while Ind <= Source'Last - PL1 loop
while Ind <= Source'Length - PL1 loop
Cur := Ind; Cur := Ind;
for K in Pattern'Range loop for K in Pattern'Range loop
if Pattern (K) /= Value (Mapping, Source (Cur)) then if Pattern (K) /= Value (Mapping, Source (Cur)) then
......
...@@ -90,8 +90,7 @@ package body Ada.Strings.Wide_Wide_Search is ...@@ -90,8 +90,7 @@ package body Ada.Strings.Wide_Wide_Search is
-- Unmapped case -- Unmapped case
if Mapping'Address = Wide_Wide_Maps.Identity'Address then if Mapping'Address = Wide_Wide_Maps.Identity'Address then
Ind := Source'First; while Ind <= Source'Last - PL1 loop
while Ind <= Source'Length - PL1 loop
if Pattern = Source (Ind .. Ind + PL1) then if Pattern = Source (Ind .. Ind + PL1) then
Num := Num + 1; Num := Num + 1;
Ind := Ind + Pattern'Length; Ind := Ind + Pattern'Length;
...@@ -103,8 +102,7 @@ package body Ada.Strings.Wide_Wide_Search is ...@@ -103,8 +102,7 @@ package body Ada.Strings.Wide_Wide_Search is
-- Mapped case -- Mapped case
else else
Ind := Source'First; while Ind <= Source'Last - PL1 loop
while Ind <= Source'Length - PL1 loop
Cur := Ind; Cur := Ind;
for K in Pattern'Range loop for K in Pattern'Range loop
if Pattern (K) /= Value (Mapping, Source (Cur)) then if Pattern (K) /= Value (Mapping, Source (Cur)) then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment