summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-09-09 07:50:07 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-09-09 07:50:07 +0000
commiteda88b6dbdc5ca6a51d54f58740f0210e618beb7 (patch)
tree8ac3a757e70b8b01b0305c66ea570b924f87607a /sv.c
parent1fad5d67a57e82e2e07162e77599f2d6d5f7a565 (diff)
downloadperl-eda88b6dbdc5ca6a51d54f58740f0210e618beb7.tar.gz
%#b in particular and %B in general were kaputt.
p4raw-id: //depot/cfgperl@4111
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index 956f3b961a..f6a793c40a 100644
--- a/sv.c
+++ b/sv.c
@@ -4959,6 +4959,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
base = 10;
goto uns_integer;
+ case 'B':
case 'b':
base = 2;
goto uns_integer;
@@ -5033,8 +5034,10 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
dig = uv & 1;
*--eptr = '0' + dig;
} while (uv >>= 1);
- if (alt && *eptr != '0')
- *--eptr = '0';
+ if (alt) {
+ esignbuf[esignlen++] = '0';
+ esignbuf[esignlen++] = c; /* 'b' or 'B' */
+ }
break;
default: /* it had better be ten or less */
do {