diff options
Diffstat (limited to 'gcc/ada/s-fileio.adb')
-rw-r--r-- | gcc/ada/s-fileio.adb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb index cf29b249533..006cf933716 100644 --- a/gcc/ada/s-fileio.adb +++ b/gcc/ada/s-fileio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2004 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- -- @@ -774,12 +774,12 @@ package body System.File_IO is end; -- If we were given a stream (call from xxx.C_Streams.Open), then set - -- full name to null and that is all we have to do in this case so - -- skip to end of processing. + -- the full name to the given one, and skip to end of processing. if Stream /= NULL_Stream then - Fullname (1) := ASCII.Nul; - Full_Name_Len := 1; + Full_Name_Len := Name'Length + 1; + Fullname (1 .. Full_Name_Len - 1) := Name; + Fullname (Full_Name_Len) := ASCII.Nul; -- Normal case of Open or Create |