Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

'b' frames are being decoded using a PACK_INT8 (signing the bits) #40

Closed
ghost opened this Issue Dec 19, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@ghost

ghost commented Dec 19, 2013

AMQP 'b' frames are being converted to a signed short short,
it should be changed in lib/amq/protocol/table_value_decoder.rb to

...
def self.decode_short_short(data, offset)
  v = data.slice(offset, 1).unpack(PACK_CHAR).first
  offset += 1
  [v, offset]
end
...

PACK_INT8 vs PACK_CHAR.

(Note this is called from the TableValueDecoder which calls it via line 53: when TYPE_SIGNED_8BIT then this should probably be reflected all the way up to be unsigned.)

A pull request will be made shortly

michaelklishin added a commit that referenced this issue Dec 20, 2013

Merge pull request #42 from OtherLevels/issue_40_resubmission
[Issue #40 resubmission] 'b' frame decoding changed from int8 to char (uint8)
Owner

michaelklishin commented Mar 17, 2014

Fixed in #42.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment