Fix for 20010514.037; substr() didn't invalidate the locale
Jarkko Hietaniemi [Tue, 15 May 2001 01:41:26 +0000 (01:41 +0000)]
collation magic.

p4raw-id: //depot/perl@10106

pp.c

diff --git a/pp.c b/pp.c
index 91c0f19..d68b689 100644 (file)
--- a/pp.c
+++ b/pp.c
@@ -2808,6 +2808,9 @@ PP(pp_substr)
            sv_pos_u2b(sv, &pos, &rem);
        tmps += pos;
        sv_setpvn(TARG, tmps, rem);
+#ifdef USE_LOCALE_COLLATE
+       sv_unmagic(TARG, 'o');
+#endif
        if (utf8_curlen)
            SvUTF8_on(TARG);
        if (repl) {