Skip to content

Commit

Permalink
fix: Y::Lib0::Decoding.read_var_uint8_array increments decoder's pos
Browse files Browse the repository at this point in the history
  • Loading branch information
hoshinotsuyoshi authored and eliias committed Apr 12, 2024
1 parent 358efdc commit af3c317
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gems/yrb-actioncable/lib/y/lib0/decoding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def self.clone(decoder, new_pos = decoder.pos)

def self.read_uint8_array(decoder, size)
view = Buffer.create_uint8_array_view_from_buffer(decoder.arr, decoder.pos + 0, size)
decoder.pos += size
view
end

def self.read_var_uint8_array(decoder)
Expand Down

0 comments on commit af3c317

Please sign in to comment.