diff options
author | Daniel Friesel <derf@finalrewind.org> | 2016-01-29 16:57:52 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2016-01-29 16:57:52 +0100 |
commit | 8b1bad7e3e8d9311cb881e4df2101203f5a1eb9e (patch) | |
tree | 194c95163163e52f215e46e678a4e7c0c5abc65b /src/display.cc | |
parent | edf5f5ab92520b6af3151bca2b97c618a9d1d7f9 (diff) |
check ->length for texts, too
Diffstat (limited to 'src/display.cc')
-rw-r--r-- | src/display.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/display.cc b/src/display.cc index 5a652c8..970d823 100644 --- a/src/display.cc +++ b/src/display.cc @@ -74,10 +74,6 @@ void Display::update() { str_pos++; } - if (active_anim->data[str_pos] == 0) { - str_pos = 0; - } - if (char_pos == 0) { disp_buf[7] = 0xff; // whitespace } else { @@ -88,9 +84,9 @@ void Display::update() { disp_buf[i] = ~active_anim->data[str_pos+i]; } str_pos += 8; - if (str_pos == active_anim->length) { - str_pos = 0; - } + } + if (str_pos >= active_anim->length) { + str_pos = 0; } } } |