diff options
Diffstat (limited to 'gcc/ada/osint-c.adb')
-rw-r--r-- | gcc/ada/osint-c.adb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/osint-c.adb b/gcc/ada/osint-c.adb index 919f188..28abc60 100644 --- a/gcc/ada/osint-c.adb +++ b/gcc/ada/osint-c.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2001-2015, Free Software Foundation, Inc. -- +-- Copyright (C) 2001-2016, 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- -- @@ -347,6 +347,13 @@ package body Osint.C is is begin Set_File_Name (ALI_Suffix.all); + + -- Remove trailing NUL that comes from Set_File_Name above. This is + -- needed for consistency with names that come from Scan_ALI and thus + -- preventing repeated scanning of the same file. + pragma Assert (Name_Len > 1 and then Name_Buffer (Name_Len) = ASCII.NUL); + Name_Len := Name_Len - 1; + Name := Name_Find; Text := Read_Library_Info (Name, Fatal_Err => False); end Read_Library_Info; |