aboutsummaryrefslogtreecommitdiffstats
path: root/src/tdisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tdisp')
-rw-r--r--src/tdisp/tdisp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tdisp/tdisp.c b/src/tdisp/tdisp.c
index a6e5e2f5..edd5b423 100644
--- a/src/tdisp/tdisp.c
+++ b/src/tdisp/tdisp.c
@@ -50,6 +50,9 @@ void tdispHome(void) {
void tdispGotoXY(coord_t col, coord_t row) {
uint8_t row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
+ if(row >= TDISP_ROWS)
+ row = TDISP_ROWS - 1;
+
TDISP_LLD(write_cmd)(0x80 | (col + row_offsets[row]));
}
@@ -60,7 +63,7 @@ void tdispDrawChar(char c) {
void tdispDrawString(char *s) {
char c;
- while(c = s++)
+ while(c = *s++)
tdispDrawChar(c);
}