aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'view.c')
-rw-r--r--view.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/view.c b/view.c
index fafabc5..773f3a7 100644
--- a/view.c
+++ b/view.c
@@ -352,6 +352,7 @@ void view_draw(View *view) {
/* ok, we encountered an invalid multibyte sequence,
* replace it with the Unicode Replacement Character
* (FFFD) and skip until the start of the next utf8 char */
+ mbstate = (mbstate_t){0};
for (len = 1; rem > len && !ISUTF8(cur[len]); len++);
cell = (Cell){ .data = "\xEF\xBF\xBD", .len = len, .width = 1 };
} else if (len == (size_t)-2) {