From 59841503c6ff29aebb9577492ec2d7908bc67a35 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Wed, 29 Dec 2021 19:01:29 +0000 Subject: Initialze the sprite index to 0 Fixes issue #10; thanks to @torihino for the report. --- src/spman/spman.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/spman/spman.c b/src/spman/spman.c index 0c7d7d1..642864e 100644 --- a/src/spman/spman.c +++ b/src/spman/spman.c @@ -17,6 +17,7 @@ uint8_t sp_last_pat; void spman_init() { sp_last_pat = 0; + sp_idx = 0; memset(sp_pat_map, SPMAN_PAT_UNUSED, SPMAN_MAX_PATTERNS); spman_sprite_flush(); } -- cgit v1.2.3