aboutsummaryrefslogtreecommitdiff
path: root/lib/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utf8.c')
-rw-r--r--lib/utf8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/utf8.c b/lib/utf8.c
index a25c613..9c118fd 100644
--- a/lib/utf8.c
+++ b/lib/utf8.c
@@ -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;

Return to:

Send suggestions and report system problems to the System administrator.