Skip to content

Commit

Permalink
fix: crash in animation
Browse files Browse the repository at this point in the history
  • Loading branch information
kiedtl committed Dec 30, 2022
1 parent 84734a0 commit 82d2974
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3212,7 +3212,7 @@ pub const Animation = union(enum) {
display.present();
std.time.sleep(anim.delay * 1_000_000);

for (anim.coords) |coord, i| if (state.player.cansee(coord)) {
for (coords.constSlice()) |coord, i| if (state.player.cansee(coord)) {
const dcoord = coordToScreen(coord).?;
const old = old_cells.constSlice()[i];
map_win.animations.setCell(dcoord.x, dcoord.y, old);
Expand Down

0 comments on commit 82d2974

Please sign in to comment.