Skip to content

Commit

Permalink
fix: resolve expanding chars
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesrocket committed Sep 12, 2024
1 parent a149fa5 commit 2a10a3f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,12 @@ fn printCells(core: *Core, handler: *Handler, rand: std.rand.Random) !void {
}

for (0..@intCast(core.width)) |w| {
if (core.columns.?.items[w].?.active) {
if (rand.boolean()) continue;
if (core.columns.?.items[w].?.chars.items.len == core.height) {
_ = core.columns.?.items[w].?.chars.pop();
}
if (rand.boolean()) continue;
if (core.columns.?.items[w].?.chars.items.len == core.height) {
_ = core.columns.?.items[w].?.chars.pop();
}

if (core.columns.?.items[w].?.active) {
if (rand.uintLessThan(u3, 7) < 3) {
try core.columns.?.items[w].?.addNull();
continue;
Expand Down

0 comments on commit 2a10a3f

Please sign in to comment.