projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
8caf10e
)
[ID 20010912.007] substr reference core dump
me-01@ton.iguana.be [Wed, 12 Sep 2001 14:11:16 +0000 (14:11 +0000)]
Message-Id: <
20010912141116
.6058.qmail@quasar.home.lunix>
p4raw-id: //depot/perl@12005
mg.c
patch
|
blob
|
blame
|
history
diff --git
a/mg.c
b/mg.c
index
9def37f
..
3de4420
100644
(file)
--- a/
mg.c
+++ b/
mg.c
@@
-1506,7
+1506,7
@@
Perl_magic_setsubstr(pTHX_ SV *sv, MAGIC *mg)
sv_insert(lsv, lvoff, lvlen, tmps, len);
SvUTF8_on(lsv);
}
- else if (SvUTF8(lsv)) {
+ else if (lsv && SvUTF8(lsv)) {
sv_pos_u2b(lsv, &lvoff, &lvlen);
tmps = (char*)bytes_to_utf8((U8*)tmps, &len);
sv_insert(lsv, lvoff, lvlen, tmps, len);