summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 5552e4f9d0..42666eefab 100644
--- a/string.c
+++ b/string.c
@@ -1375,7 +1375,7 @@ str_inspect(str)
while (p < pend) {
UCHAR c = *p++;
- if (ismbchar(c) && p < pend) {
+ if (ismbchar(c) && p < pend && ismbchar2(*p)) {
CHECK(2);
*b++ = c;
*b++ = *p++;