about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c
index acb891d82..1b80e8cb0 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -5417,7 +5417,7 @@ mb_metastrlenend(char *ptr, int width, char *eptr)
     int num, num_in_char, complete;
 
     if (!isset(MULTIBYTE))
-	return ztrlen(ptr);
+	return eptr ? (int)(eptr - ptr) : ztrlen(ptr);
 
     laststart = ptr;
     ret = MB_INVALID;