'perl -v' fails if local_patches contains code snippets
Alan Burlison [Wed, 26 May 2004 16:24:03 +0000 (17:24 +0100)]
Message-ID: <40B4B693.9090905@sun.com>
(using \0 as a separator for q//)

p4raw-id: //depot/perl@22850

perl.c

diff --git a/perl.c b/perl.c
index 38766c5..e94c2ad 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -1364,7 +1364,8 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
                    sv_catpv(PL_Sv,"\"  Locally applied patches:\\n\",");
                    for (i = 1; i <= LOCAL_PATCH_COUNT; i++) {
                        if (PL_localpatches[i])
-                           Perl_sv_catpvf(aTHX_ PL_Sv,"q\"  \t%s\n\",",PL_localpatches[i]);
+                           Perl_sv_catpvf(aTHX_ PL_Sv,"q%c\t%s\n%c,",
+                                   0, PL_localpatches[i], 0);
                    }
                }
 #endif