From 9686dbc79e2904ce4047003d78e30c7056321151 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Fri, 12 Apr 2013 15:03:19 +0200 Subject: [multiple changes] 2013-04-12 Robert Dewar * sem.ads, opt.ads: Minor comment edits. * sem_warn.adb, sem_ch6.adb: Minor reformatting. 2013-04-12 Claire Dross * a-cfdlli.adb a-cfdlli.ads (List, Not_No_Element, Iterate, Reverse_Iterate, Query_Element, Update_Element, Read, Write): Removed, not suitable for formal analysis. 2013-04-12 Ed Schonberg * sem_prag.adb (Analyze_Abstract_State): Use Defining entity to locate package entity, which may be a child unit. 2013-04-12 Thomas Quinot * g-socket.adb, g-socket.ads (Connect_Socket, version with timeout): If the specified timeout is 0, do not attempt to determine whether the connection succeeded. 2013-04-12 Doug Rupp * s-fileio.adb (Form_RMS Context_Key): Fix some thinkos. From-SVN: r197904 --- gcc/ada/s-fileio.adb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gcc/ada/s-fileio.adb') diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb index a9e04e8..32f0c90 100644 --- a/gcc/ada/s-fileio.adb +++ b/gcc/ada/s-fileio.adb @@ -696,12 +696,14 @@ package body System.File_IO is Klen := KImage'Length; To_Lower (KImage); - if Form (Index .. Index + Klen - 1) = KImage then + if Index + Klen - 1 <= Form'Last and then + Form (Index .. Index + Klen - 1) = KImage + then case Parm is when Force_Record_Mode => VMS_Form (Pos) := '"'; Pos := Pos + 1; - VMS_Form (Pos .. Pos + 7) := "ctx=rec"; + VMS_Form (Pos .. Pos + 6) := "ctx=rec"; Pos := Pos + 7; VMS_Form (Pos) := '"'; Pos := Pos + 1; @@ -711,7 +713,7 @@ package body System.File_IO is when Force_Stream_Mode => VMS_Form (Pos) := '"'; Pos := Pos + 1; - VMS_Form (Pos .. Pos + 7) := "ctx=stm"; + VMS_Form (Pos .. Pos + 6) := "ctx=stm"; Pos := Pos + 7; VMS_Form (Pos) := '"'; Pos := Pos + 1; -- cgit v1.1