Skip to content
Browse files

Merge pull request #12 from robertabcd/master

Fix bug: read extra fields if flags array is shorter than fields
  • Loading branch information...
2 parents 8b217aa + 6bd4b21 commit 1b47dac1302f81b979975a2076485ffe7f4e9334 @warhammerkid warhammerkid committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/rocketamf/values/messages.rb
2 lib/rocketamf/values/messages.rb
@@ -50,6 +50,8 @@ def read_external_fields des, fields
# Read fields and any remaining unmapped fields in a byte-set
fields.each_with_index do |list, i|
+ break if flags[i].nil?
list.each_with_index do |name, j|
if flags[i] & 2**j != 0
send("#{name}=", des.read_object)

0 comments on commit 1b47dac

Please sign in to comment.
Something went wrong with that request. Please try again.