Skip to content

Commit

Permalink
Make Buf.write-bits really work on type objects
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 4, 2019
1 parent 43b5e76 commit 18ff905
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core.c/Buf.pm6
Expand Up @@ -872,7 +872,7 @@ my role Buf[::T = uint8] does Blob[T] is repr('VMArray') is array_type(T) {
# all done in a single byte
if $first-byte == $last-byte {
nqp::bindpos_i($self,$first-byte,
$value +| (nqp::atpos_i(self,$first-byte) +& ($lmask +| $rmask))
$value +| (nqp::atpos_i($self,$first-byte) +& ($lmask +| $rmask))
);
}

Expand All @@ -883,7 +883,7 @@ my role Buf[::T = uint8] does Blob[T] is repr('VMArray') is array_type(T) {
# process last byte first if it is a partial
if $last-bit {
nqp::bindpos_i($self,$i,
($value +& 255) +| (nqp::atpos_i(self,$i) +& $rmask)
($value +& 255) +| (nqp::atpos_i($self,$i) +& $rmask)
);
$value := $value +> 8;
}
Expand Down

0 comments on commit 18ff905

Please sign in to comment.