aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gdisp/mcufont/mf_encoding.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gdisp/mcufont/mf_encoding.c b/src/gdisp/mcufont/mf_encoding.c
index 2c8abf3a..e0c89355 100644
--- a/src/gdisp/mcufont/mf_encoding.c
+++ b/src/gdisp/mcufont/mf_encoding.c
@@ -75,11 +75,16 @@ void mf_rewind(mf_str *str)
#else
-mf_char mf_getchar(mf_str *str) {
- return *(*str)++;
+mf_char mf_getchar(mf_str *str)
+{
+ if (!(**str))
+ return 0;
+ else
+ return *(*str)++;
}
-void mf_rewind(mf_str *str) {
+void mf_rewind(mf_str *str)
+{
(*str)--;
}