rubyamf / rocketamf

52 stars 34 forks source link

RuntimeError: Not supported: 47 #15

Closed matchu closed 11 years ago

matchu commented 11 years ago

Consider the following AMF message received from AMFPHP on Neopets.com: https://dl.dropboxusercontent.com/u/803129/glitched.amf

Flash is able to read this response properly, as is SabreAMF: https://dl.dropboxusercontent.com/u/803129/glitched.txt

RocketAMF, however, fails to read the response:

> response = File.open('glitched.amf', 'rb') { |f| f.read }
> RocketAMF::Envelope.new.populate_from_stream(response)
RuntimeError: Not supported: 47

I suspect the issue is at messages[0]['custom_pet']['biology_by_zone']: note that the hash contains a null key. This really shouldn't be a part of the message and is almost certainly a bug on their part, but it still oughta be deserialized correctly, anyway—especially since it's just so hard to get those guys to fix bugs :P

matchu commented 11 years ago

Sweet turnaround. Thanks :)