Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
check string explicitly for not containing zero
...since "0" if now true.
  • Loading branch information
FROGGS committed Apr 10, 2015
1 parent c4044af commit 4409a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HLL/sprintf.nqp
Expand Up @@ -148,7 +148,7 @@ my module sprintf {
method directive:sym<b>($/) {
my $int := intify(next_argument($/));
$int := nqp::base_I($int, 2);
my $pre := ($<sym> eq 'b' ?? '0b' !! '0B') if $int && has_flag($/, 'hash');
my $pre := ($<sym> eq 'b' ?? '0b' !! '0B') if $int ne '0' && has_flag($/, 'hash');
if nqp::chars($<precision>) {
$int := '' if $<precision>.made == 0 && $int == 0;
$int := $pre ~ infix_x('0', $<precision>.made - nqp::chars($int)) ~ $int;
Expand Down

0 comments on commit 4409a04

Please sign in to comment.