summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/storage.cc1
-rw-r--r--src/system.cc3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/storage.cc b/src/storage.cc
index 517fedf..d1c2ee1 100644
--- a/src/storage.cc
+++ b/src/storage.cc
@@ -248,7 +248,6 @@ bool Storage::hasData()
return num_anims;
}
-// TODO support multi-page reads
void Storage::load(uint8_t idx, uint8_t *data)
{
uint8_t page_offset;
diff --git a/src/system.cc b/src/system.cc
index fdf3e4d..d8c27ab 100644
--- a/src/system.cc
+++ b/src/system.cc
@@ -90,6 +90,9 @@ void System::initialize()
void System::loadPattern(uint8_t anim_no)
{
+ if (!storage.hasData())
+ return;
+
storage.load(anim_no, disp_buf);
active_anim.type = (AnimationType)(disp_buf[0] >> 4);