Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #395 from raydiak/packfix
Fix a pack 'H' bug
  • Loading branch information
FROGGS committed Mar 26, 2015
2 parents 9746e88 + fe9bade commit c5ba5b8
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 c5ba5b8

Please sign in to comment.