summaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-16 12:33:11 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-16 12:33:11 -0500
commit824c4ff4be5a0bf55b6644fed06fcfe2248c4301 (patch)
tree0eb56394e769e23005a9f03ffea0557c2577e542 /text.c
parent4bde24cb63313f636ac72b449f54d68515efe485 (diff)
started getting :build to work
Diffstat (limited to 'text.c')
-rw-r--r--text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/text.c b/text.c
index aeb17ea..1096e8c 100644
--- a/text.c
+++ b/text.c
@@ -323,7 +323,7 @@ void text_utf8_with_state(Font *font, TextRenderState *state, char const *str) {
size_t ret = unicode_utf8_to_utf32(&c, str, (size_t)(end - str));
if (ret == 0) {
break;
- } else if (ret == (size_t)-1) {
+ } else if (ret >= (size_t)-2) {
// invalid UTF-8
text_char_with_state(font, state, '?');
++str;