summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-04-07 19:25:39 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-04-07 19:25:39 +0000
commitd5a15ac20b88745ab30b67e8201632b6f5e6a04c (patch)
treece606a893fa7b4baf7541ab057ce7711165b6e60 /pp.c
parentdedf98bc6289c70e2368bc395e2ec91fed11fc33 (diff)
downloadperl-d5a15ac20b88745ab30b67e8201632b6f5e6a04c.tar.gz
The SvGROW() might move the PV.
p4raw-id: //depot/perl@19163
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 1bbe8955e7..fde8b127df 100644
--- a/pp.c
+++ b/pp.c
@@ -3387,7 +3387,8 @@ PP(pp_chr)
tmps = SvPVX(TARG);
if (SvCUR(TARG) == 0 || !is_utf8_string((U8*)tmps, SvCUR(TARG)) ||
memEQ(tmps, "\xef\xbf\xbd\0", 4)) {
- SvGROW(TARG,3);
+ SvGROW(TARG, 3);
+ tmps = SvPVX(TARG);
SvCUR_set(TARG, 2);
*tmps++ = (U8)UTF8_EIGHT_BIT_HI(value);
*tmps++ = (U8)UTF8_EIGHT_BIT_LO(value);