Skip to content

Commit

Permalink
Merge pull request rubyamf#12 from robertabcd/master
Browse files Browse the repository at this point in the history
Fix bug: read extra fields if flags array is shorter than fields
  • Loading branch information
warhammerkid committed Feb 3, 2013
2 parents 8b217aa + 6bd4b21 commit 1b47dac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rocketamf/values/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1b47dac

Please sign in to comment.