summaryrefslogtreecommitdiff
path: root/gcc/ada/a-textio.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 13:02:55 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 13:02:55 +0000
commit9e555810ce3a72772cc223a42d293f349d5f2ef1 (patch)
tree0126ea2b3ba29b875348601ed7cceb253d55ec95 /gcc/ada/a-textio.adb
parentb6a53a17ac8769adb9411bf0e0c757f0a31f4b7f (diff)
downloadgcc-9e555810ce3a72772cc223a42d293f349d5f2ef1.tar.gz
2010-10-08 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Check_Duplicate_Pragma): New procedure Add calls to this new procedure where appropriate 2010-10-08 Vincent Celier <celier@adacore.com> * a-textio.adb (Get_Chunk): Code clean up. 2010-10-08 Robert Dewar <dewar@adacore.com> * a-strbou.ads, a-strfix.adb, a-strfix.ads, a-strsea.adb, a-strsea.ads, a-strsup.adb, a-strsup.ads, a-strunb-shared.adb, a-strunb-shared.ads, a-strunb.adb, a-strunb.ads, a-stwibo.ads, a-stwifi.adb, a-stwifi.ads, a-stwise.adb, a-stwise.ads, a-stwisu.adb, a-stwisu.ads, a-stwiun-shared.adb, a-stwiun-shared.ads, a-stwiun.adb, a-stwiun.ads, a-stzbou.ads, a-stzfix.adb, a-stzfix.ads, a-stzsea.adb, a-stzsea.ads, a-stzsup.adb, a-stzsup.ads, a-stzunb-shared.adb, a-stzunb-shared.ads, a-stzunb.adb, a-stzunb.ads (Find_Token): New version with From parameter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-textio.adb')
-rw-r--r--gcc/ada/a-textio.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/a-textio.adb b/gcc/ada/a-textio.adb
index 27a0c3b7f74..924bfe59b3e 100644
--- a/gcc/ada/a-textio.adb
+++ b/gcc/ada/a-textio.adb
@@ -758,7 +758,7 @@ package body Ada.Text_IO is
if P = Null_Address then
pragma Assert (Buf (N) = ASCII.NUL);
- memcpy (Item (Item'First + Last)'Address,
+ memcpy (Item (Last + 1)'Address,
Buf (1)'Address, size_t (N - 1));
Last := Last + N - 1;
@@ -783,7 +783,7 @@ package body Ada.Text_IO is
K := K - 1;
end if;
- memcpy (Item (Item'First + Last)'Address,
+ memcpy (Item (Last + 1)'Address,
Buf (1)'Address, size_t (K));
Last := Last + K;
end;