From b7c9f3fda8006c492ec07074d480c977e3e64da3 Mon Sep 17 00:00:00 2001 From: Kilian Gebhardt Date: Mon, 5 Jun 2023 12:40:25 +0200 Subject: [PATCH] gnattest: fix unsave list access in Test.Skeleton.Add_DT --- src/test-skeleton.adb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test-skeleton.adb b/src/test-skeleton.adb index 8fbf0e25..74c52a31 100755 --- a/src/test-skeleton.adb +++ b/src/test-skeleton.adb @@ -7359,6 +7359,13 @@ package body Test.Skeleton is TP_Mapping_List.Next (TP_Cur); end loop; + if TP_Cur = TP_Mapping_List.No_Element then + TP.TP_Name := new String'(TPtarg); + TP.DT_List.Append (TD); + TP_List.Append (TP); + return; + end if; + TP := TP_Mapping_List.Element (TP_Cur); TP.DT_List.Append (TD); TP_List.Replace_Element (TP_Cur, TP);