summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorAdrian M. Enache <enache@rdslink.ro>2003-01-30 12:48:09 +0200
committerJarkko Hietaniemi <jhi@iki.fi>2003-01-30 08:05:22 +0000
commita5b510f29827514a9bbd7758f42522c7688a9dc7 (patch)
treeb318bf5f8cd73bb9552e43494612388f452ba73f /sv.c
parent353565830fa7530dbdb00eac8f4afe82b3a60a7e (diff)
downloadperl-a5b510f29827514a9bbd7758f42522c7688a9dc7.tar.gz
[FIX] Re: UTF-8 failures (surprise!)
Message-ID: <20030130084809.GA16902@ratsnest.hole> Fix for half of the failures, with an expanded test. p4raw-id: //depot/perl@18603
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index c7c83a94e2..5a99375095 100644
--- a/sv.c
+++ b/sv.c
@@ -5787,6 +5787,8 @@ Perl_sv_pos_b2u(pTHX_ register SV* sv, I32* offsetp)
U8 *p = s + cache[1];
STRLEN ubackw = 0;
+ cache[1] -= backw;
+
while (backw--) {
p--;
while (UTF8_IS_CONTINUATION(*p))
@@ -5795,7 +5797,6 @@ Perl_sv_pos_b2u(pTHX_ register SV* sv, I32* offsetp)
}
cache[0] -= ubackw;
- cache[1] -= backw;
return;
}