summaryrefslogtreecommitdiff
path: root/core/bindings.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/bindings.zig')
-rw-r--r--core/bindings.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/bindings.zig b/core/bindings.zig
index 345c2a4a..b2d84a7c 100644
--- a/core/bindings.zig
+++ b/core/bindings.zig
@@ -292,7 +292,7 @@ pub fn level(p: *const Pardes, root: Root, path: []const u8, out: *[max_children
}
};
const shown = out[0..n];
- for (1..shown.len) |i| {
+ for (1..@max(1, shown.len)) |i| {
var j = i;
while (j > 0 and rank(shown[j].key, shown[j].group) < rank(shown[j - 1].key, shown[j - 1].group)) : (j -= 1)
std.mem.swap(Child, &shown[j], &shown[j - 1]);