diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-15 09:32:25 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-15 09:32:25 +0000 |
commit | 165633c00f7ebfd93f2da18eda1f8686b3818de3 (patch) | |
tree | b2c80f9b972763c47d1781393bcc7b3fcafa9747 /gcc/ada/a-strsup.adb | |
parent | ec677a6c3a40284ccffa6de052697c0f56bc92d3 (diff) | |
download | gcc-165633c00f7ebfd93f2da18eda1f8686b3818de3.tar.gz |
* a-stwisu.adb, a-strsup.adb, a-stzsup.adb (Super_Slice): Fix slice
index.
* a-stwima.adb (To_Set): Add extra check when N = 0.
* g-regpat.adb: (Match_Simple_Operator): Avoid possible overflow.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111033 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-strsup.adb')
-rw-r--r-- | gcc/ada/a-strsup.adb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/a-strsup.adb b/gcc/ada/a-strsup.adb index 1b1c9090c92..a53a94d5e41 100644 --- a/gcc/ada/a-strsup.adb +++ b/gcc/ada/a-strsup.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2003-2005, Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2006, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1471,7 +1471,7 @@ package body Ada.Strings.Superbounded is raise Index_Error; else Result.Current_Length := High - Low + 1; - Result.Data (1 .. Source.Current_Length) := Source.Data (Low .. High); + Result.Data (1 .. Result.Current_Length) := Source.Data (Low .. High); end if; return Result; @@ -1490,7 +1490,7 @@ package body Ada.Strings.Superbounded is raise Index_Error; else Target.Current_Length := High - Low + 1; - Target.Data (1 .. Source.Current_Length) := Source.Data (Low .. High); + Target.Data (1 .. Target.Current_Length) := Source.Data (Low .. High); end if; end Super_Slice; |