terminal: ensure our std_capacity fits within max page size

This commit is contained in:
Mitchell Hashimoto
2026-01-16 14:24:02 -08:00
parent 85a3d623b2
commit 442a395850

View File

@@ -292,7 +292,8 @@ fn initialCapacity(cols: size.CellCountInt) Capacity {
comptime {
var cap = std_capacity;
cap.cols = std.math.maxInt(size.CellCountInt);
_ = Page.layout(cap);
const layout = Page.layout(cap);
assert(layout.total_size <= size.max_page_size);
}
if (std_capacity.adjust(