diff --git a/src/chars.c b/src/chars.c
index b65e89558279343d76f43fbc69e9ae7c406a15e5..badb1082f2b8b72d392c3c6534f2410f1b6c45e6 100644
--- a/src/chars.c
+++ b/src/chars.c
@@ -382,11 +382,10 @@ int parse_mbchar(const char *buf, char *chr, size_t *col)
 	length = mblen(buf, MB_CUR_MAX);
 
 	/* When the multibyte sequence is invalid, only take the first byte. */
-	if (length < 0) {
+	if (length <= 0) {
 	    IGNORE_CALL_RESULT(mblen(NULL, 0));
 	    length = 1;
-	} else if (length == 0)
-	    length = 1;
+	}
 
 	/* When requested, store the multibyte character in chr. */
 	if (chr != NULL) {