summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2000-11-13 06:49:40 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2000-11-14 01:13:54 +0000
commitcc366d4bfec1d12643c0fb8ca45074934bcc46bb (patch)
tree4cea6dddce3edc7f288719bc10bd012e88a2c072 /toke.c
parent54d9745e6c10264c5b7e27933a7a229432a2760e (diff)
downloadperl-cc366d4bfec1d12643c0fb8ca45074934bcc46bb.tar.gz
[ID 20001113.003] utf8_to_uv on malformed utf returns wrong values
Message-Id: <200011132249.eADMnek09679@garcia.efn.org> p4raw-id: //depot/perl@7677
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 458e258513..b48577e9e2 100644
--- a/toke.c
+++ b/toke.c
@@ -1332,7 +1332,7 @@ S_scan_const(pTHX_ char *start)
UV uv;
uv = utf8_to_uv((U8*)s, send - s, &len, UTF8_CHECK_ONLY);
- if (len == 1) {
+ if (len == (STRLEN)-1) {
/* Illegal UTF8 (a high-bit byte), make it valid. */
char *old_pvx = SvPVX(sv);
/* need space for one extra char (NOTE: SvCUR() not set here) */