commit bf091be778fa3929d1b8120ee44cc8d6f7d14054
parent 103dd06347bcecbaa807c438864eb747d464d745
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Thu, 21 Jul 2016 09:46:47 +0200
chars: don't try to see a character in an empty line
This fixes https://savannah.gnu.org/bugs/?48578.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/chars.c b/src/chars.c
@@ -190,6 +190,9 @@ bool is_word_mbchar(const char *c, bool allow_punct)
{
assert(c != NULL);
+ if (*c == '\0')
+ return FALSE;
+
if (is_alnum_mbchar(c))
return TRUE;