X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/7364b7274fdc91716c7ab647f5eb743fd1960bd6..f2da68c5992fe2c29cced7e51709d0a45e0bb3b4:/video/text.c?ds=inline diff --git a/video/text.c b/video/text.c index a25c8aa..7fe30c9 100644 --- a/video/text.c +++ b/video/text.c @@ -5,6 +5,7 @@ #include #include #include +#include static unsigned char _font[256 * 32]; @@ -80,7 +81,6 @@ uint32_t text_checksum(int x, int y, int w, int h) unsigned int textx = x / 9; unsigned int texty = y / 14; int cx, cy; - unsigned char ch, at; uint32_t cksm = 0; smram_state_t old_state = smram_save_state(); @@ -91,7 +91,7 @@ uint32_t text_checksum(int x, int y, int w, int h) cx = x; texty = cy / 14; textx = cx / 9; - cksm ^= crc32(video + texty * 160 + textx * 2, (w / 9 + 1) * 2); /* Err on the side of 'too many'. */ + cksm = crc32(video + texty * 160 + textx * 2, (w / 9) * 2 + 2, cksm); /* Err on the side of 'too many'. */ } smram_restore_state(old_state);