We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2920ca commit 16e3615Copy full SHA for 16e3615
dom/dom-core-nodes.adb
@@ -244,7 +244,7 @@ package body DOM.Core.Nodes is
244
function First_Child (N : Node) return Node is
245
List : constant Node_List := Child_Nodes (N);
246
begin
247
- if List.Items = null then
+ if List.Items = null or List.Last < 0 then
248
return null;
249
else
250
return List.Items (0);
@@ -258,7 +258,7 @@ package body DOM.Core.Nodes is
258
function Last_Child (N : Node) return Node is
259
260
261
262
263
264
return List.Items (List.Last);
0 commit comments