aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-textio.adb
diff options
context:
space:
mode:
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 27a0c3b..924bfe5 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;