diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-09-09 18:24:30 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-09-09 18:24:30 +0000 |
commit | 7481bb52051f557e66a749903d91c3b51ae46e5c (patch) | |
tree | b139c63e50cb5beb9ff5b2baab5733bd474c814c | |
parent | d3a1d5647737d6f75a9a27253766130f69d2a48e (diff) | |
download | perl-7481bb52051f557e66a749903d91c3b51ae46e5c.tar.gz |
Remove ill-designed %B introduced by change #4111.
p4raw-link: @4111 on //depot/cfgperl: eda88b6dbdc5ca6a51d54f58740f0210e618beb7
p4raw-id: //depot/cfgperl@4117
-rw-r--r-- | sv.c | 3 | ||||
-rwxr-xr-x | t/op/sprintf.t | 4 |
2 files changed, 3 insertions, 4 deletions
@@ -4959,7 +4959,6 @@ 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; @@ -5036,7 +5035,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV } while (uv >>= 1); if (alt) { esignbuf[esignlen++] = '0'; - esignbuf[esignlen++] = c; /* 'b' or 'B' */ + esignbuf[esignlen++] = 'b'; } break; default: /* it had better be ten or less */ diff --git a/t/op/sprintf.t b/t/op/sprintf.t index 582dfb4a16..70e55cb6cb 100755 --- a/t/op/sprintf.t +++ b/t/op/sprintf.t @@ -14,8 +14,8 @@ $SIG{__WARN__} = sub { }; $w = 0; -$x = sprintf("%3s %-4s%%foo %.0d%5d %#x%c%3.1f %b %x %X %#b %#B %#x %#X","hi",123,0,456,0,ord('A'),3.0999,11,171,171,11,11,171,171); -if ($x eq ' hi 123 %foo 456 0A3.1 1011 ab AB 0b1011 0B1011 0xab 0XAB' && $w == 0) { +$x = sprintf("%3s %-4s%%foo %.0d%5d %#x%c%3.1f %b %x %X %#b %#x %#X","hi",123,0,456,0,ord('A'),3.0999,11,171,171,11,171,171); +if ($x eq ' hi 123 %foo 456 0A3.1 1011 ab AB 0b1011 0xab 0XAB' && $w == 0) { print "ok 1\n"; } else { print "not ok 1 '$x'\n"; |