summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 3a5c1ec854..7da1e5bc69 100644
--- a/utf8.c
+++ b/utf8.c
@@ -400,6 +400,7 @@ malformed:
case UTF8_WARN_SHORT:
Perl_sv_catpvf(aTHX_ sv, "(%d byte%s, need %d)",
curlen, curlen == 1 ? "" : "s", expectlen);
+ expectlen = curlen; /* distance for caller to skip */
break;
case UTF8_WARN_OVERFLOW:
Perl_sv_catpvf(aTHX_ sv, "(overflow at 0x%"UVxf", byte 0x%02x)",