Skip to content

Commit

Permalink
fix: allow empty core.accents
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesrocket committed Nov 12, 2024
1 parent 6aca4cf commit c8db965
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,14 @@ const Column = struct {
core: *Core,
) void {
if (self.cooldown == 0) {
self.dimmed = if ((std.mem.count(
Accent,
core.accents.?,
&[_]Accent{Accent.dim},
)) > 0) core.rand.?.boolean() else false;
if (core.accents != null) {
self.dimmed = if ((std.mem.count(
Accent,
core.accents.?,
&[_]Accent{Accent.dim},
)) > 0) core.rand.?.boolean() else false;
}

self.active = true;
core.active_columns += 1;
}
Expand Down

0 comments on commit c8db965

Please sign in to comment.