diff options
Diffstat (limited to 'lib/utf8.c')
-rw-r--r-- | lib/utf8.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* This file is part of GNU Dico - Copyright (C) 2007-2019 Sergey Poznyakoff + Copyright (C) 2007-2023 Sergey Poznyakoff GNU Dico is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1545,7 +1545,7 @@ utf8_iter0(struct utf8_iterator *itr) return 1; } n = utf8_char_width(itr->curptr); - if (n > itr->length) { + if (n == 0 || n > itr->length) { itr->end = 1; itr->err = 1; return 1; |