Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix a pack 'H' bug
  • Loading branch information
raydiak committed Mar 26, 2015
1 parent 9746e88 commit fe9bade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Buf.pm
Expand Up @@ -317,7 +317,7 @@ multi sub pack(Str $template, *@items) {
}
when 'H' {
my $hexstring = shift @items // '';
if $hexstring % 2 {
if $hexstring.chars % 2 {
$hexstring ~= '0';
}
@bytes.push: map { :16($_) }, $hexstring.comb(/../);
Expand Down

0 comments on commit fe9bade

Please sign in to comment.