summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-27 14:00:24 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-27 14:00:24 +0000
commit1bd104fb42e49d4507cd6d328c6a09508c790c28 (patch)
treefbbd3c89b0514a3c09a8ba78469dc16802bace3c /sv.c
parentab1e085c39e9da9a4cec7d00a632a24d5c3b397f (diff)
downloadperl-1bd104fb42e49d4507cd6d328c6a09508c790c28.tar.gz
sv_catpvf(sv, "%c", 128) should not UTF-8-ify the sv,
noted by Gisle and fixed by NI-S. p4raw-id: //depot/perl@9375
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index 315c85b1a0..75b35a81ff 100644
--- a/sv.c
+++ b/sv.c
@@ -7130,7 +7130,9 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
case 'c':
uv = args ? va_arg(*args, int) : SvIVx(argsv);
- if ((uv > 255 || (!UNI_IS_INVARIANT(uv) || SvUTF8(sv))) && !IN_BYTE) {
+ if ((uv > 255 ||
+ (!UNI_IS_INVARIANT(uv) && SvUTF8(sv)))
+ && !IN_BYTE) {
eptr = (char*)utf8buf;
elen = uvchr_to_utf8((U8*)eptr, uv) - utf8buf;
is_utf = TRUE;