From a8c5087a38a2b0da64d5f4532c0b5de68b136758 Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Sun, 4 May 2025 21:18:30 +0800 Subject: [PATCH] Remove undefined that causes crash These values are set to undefined, and used (in the item function) before ever being set. Causes crashes in release mode. --- src/browser/dom/html_collection.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/dom/html_collection.zig b/src/browser/dom/html_collection.zig index 9580b8f0..01de0a50 100644 --- a/src/browser/dom/html_collection.zig +++ b/src/browser/dom/html_collection.zig @@ -281,8 +281,8 @@ pub const HTMLCollection = struct { include_root: bool = false, // save a state for the collection to improve the _item speed. - cur_idx: ?u32 = undefined, - cur_node: ?*parser.Node = undefined, + cur_idx: ?u32 = null, + cur_node: ?*parser.Node = null, // start returns the first node to walk on. fn start(self: *const HTMLCollection) !?*parser.Node {