summaryrefslogtreecommitdiff
path: root/dev-lang/gnat-gpl/files/gnat-gpl-2018-gentoo.patch
blob: 5d6a38af14e30ba887b9ea5032edc454f727f1af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/gcc-7-gpl-2018-src/gcc/ada/osint.adb	2017-03-10 21:58:02.600710156 +0100
+++ b/gcc-7-gpl-2018-src/gcc/ada/osint.adb	2017-03-10 21:59:38.033983293 +0100
@@ -2229,14 +2229,11 @@
       for J in Start_Of_Prefix .. Name_Len - Prog'Length + 1 loop
          if Name_Buffer (J .. J + Prog'Length - 1) = Prog then
             End_Of_Prefix := J - 1;
+            Start_Of_Suffix := J + Prog'Length;
             exit;
          end if;
       end loop;
 
-      if End_Of_Prefix > 1 then
-         Start_Of_Suffix := End_Of_Prefix + Prog'Length + 1;
-      end if;
-
       --  Create the new program name
 
       return new String'