diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-31 00:16:44 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-31 00:16:44 +0000 |
commit | 0064a8a9866779dceb087452b9bfaa733c51adce (patch) | |
tree | 3fdfd380d1e3b371bed489f787cf1c3a69e22234 /mg.c | |
parent | 9c5ffd7c3fe1ab64d3e7d06810ac3ab42426718b (diff) | |
download | perl-0064a8a9866779dceb087452b9bfaa733c51adce.tar.gz |
Salvage bits and pieces from the experimental 'utf8 everywhere'
patch: rename HINT_BYTE and IN_BYTE to HINT_BYTES and IN_BYTES
to match the pragma name; various robustness cleanups.
p4raw-id: //depot/perl@10339
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -375,9 +375,11 @@ Perl_magic_regdatum_get(pTHX_ SV *sv, MAGIC *mg) if (i > 0 && DO_UTF8(PL_reg_sv)) { char *b = rx->subbeg; - i = Perl_utf8_length(aTHX_ (U8*)b, (U8*)(b+i)); + if (b) + i = Perl_utf8_length(aTHX_ (U8*)b, (U8*)(b+i)); } - sv_setiv(sv,i); + + sv_setiv(sv, i); } } return 0; |