From e57fd65cfd740f992324e7b7c23b0d6656e8cb77 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sat, 5 Dec 2020 10:42:42 +1100 Subject: Fixed bug in debug string for empty graph --- src/packrat-parse_graphs.adb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/packrat-parse_graphs.adb b/src/packrat-parse_graphs.adb index 2d5c2a5..99ce360 100644 --- a/src/packrat-parse_graphs.adb +++ b/src/packrat-parse_graphs.adb @@ -206,6 +206,9 @@ package body Packrat.Parse_Graphs is Current : Traits.Tokens.Token_Type; Result : SU.Unbounded_String; begin + if Container.Is_Empty then + return ""; + end if; for Iter in Mapping.Iterate loop SU.Append (Result, Traits.Label_Enum'Image (Enum_Node_Maps.Key (Iter)) & Latin.LF); for Node of Enum_Node_Maps.Element (Iter) loop -- cgit