summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorSADAHIRO Tomoyuki <BQW10602@nifty.com>2006-10-27 09:19:34 +0900
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-26 15:30:52 +0000
commite6bb52fd8a15fdb23e83c108d05608cd4c7ff736 (patch)
treeb569744c21e0c95d8cac38883fdd834cf301c9c0 /sv.c
parentb807ffce5a6398cd7b6fcdae69415758b115ceaa (diff)
downloadperl-e6bb52fd8a15fdb23e83c108d05608cd4c7ff736.tar.gz
Re: [perl #40583] sprintf "%#04X" also uppercases the 0x-prefix
Message-Id: <20061027001924.B158.BQW10602@nifty.com> p4raw-id: //depot/perl@29116
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index e38d4b784e..4f9a625d81 100644
--- a/sv.c
+++ b/sv.c
@@ -9148,7 +9148,8 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
if (has_precis) {
if (precis > elen)
zeros = precis - elen;
- else if (precis == 0 && elen == 1 && *eptr == '0')
+ else if (precis == 0 && elen == 1 && *eptr == '0'
+ && !(base == 8 && alt)) /* "%#.0o" prints "0" */
elen = 0;
/* a precision nullifies the 0 flag. */