diff options
author | Tsutomu IKEGAMI <t-ikegami@aist.go.jp> | 2005-06-18 02:55:10 +0900 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-06-21 07:03:40 +0000 |
commit | 7af36d83c0adcbdfcd87806abf6e33bf0c9a61db (patch) | |
tree | 676916a9de04c27fb30119cabab187ce4741283a /sv.c | |
parent | 3fbfee08a74a1551b76e125a3e0da03f2884c21b (diff) | |
download | perl-7af36d83c0adcbdfcd87806abf6e33bf0c9a61db.tar.gz |
Re: [perl #36310] sv_vcatpvfn() fails on some (very limited) situations
Message-Id: <20050617.175510.21285350.t-ikegami@aist.go.jp>
p4raw-id: //depot/perl@24916
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -8847,7 +8847,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV #ifndef USE_LONG_DOUBLE /* special-case "%.<number>[gf]" */ - if ( patlen <= 5 && pat[0] == '%' && pat[1] == '.' + if ( !args && patlen <= 5 && pat[0] == '%' && pat[1] == '.' && (pat[patlen-1] == 'g' || pat[patlen-1] == 'f') ) { unsigned digits = 0; const char *pp; @@ -8858,9 +8858,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV if (pp - pat == (int)patlen - 1) { NV nv; - if (args) - nv = (NV)va_arg(*args, double); - else if (svix < svmax) + if (svix < svmax) nv = SvNV(*svargs); else return; @@ -8937,7 +8935,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV STRLEN have; STRLEN need; STRLEN gap; - const char *dotstr = "."; + const char *dotstr = "."; STRLEN dotstrlen = 1; I32 efix = 0; /* explicit format parameter index */ I32 ewix = 0; /* explicit width index */ |