sv_vcatpvfn() bug: fell through to assuming intsize of 'q' for
Gurusamy Sarathy [Fri, 22 Oct 1999 21:16:44 +0000 (21:16 +0000)]
C<"%ld", long_val>

p4raw-id: //depot/perl@4421

sv.c

diff --git a/sv.c b/sv.c
index cb83771..30de6af 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -5139,6 +5139,13 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
        /* SIZE */
 
        switch (*q) {
+#ifdef HAS_QUAD
+       case 'L':                       /* Ld */
+       case 'q':                       /* qd */
+           intsize = 'q';
+           q++;
+           break;
+#endif
        case 'l':
 #ifdef HAS_QUAD
              if (*(q + 1) == 'l') {    /* lld */
@@ -5146,12 +5153,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
                q += 2;
                break;
             }
-       case 'L':                       /* Ld */
-       case 'q':                       /* qd */
-           intsize = 'q';
-           q++;
-           break;
 #endif
+           /* FALL THROUGH */
        case 'h':
            /* FALL THROUGH */
        case 'V':