buffer: fix sign overflow in `readUIn32BE`
authorFedor Indutny <fedor@indutny.com>
Tue, 29 Jul 2014 08:34:49 +0000 (12:34 +0400)
committerFedor Indutny <fedor@indutny.com>
Tue, 29 Jul 2014 08:34:49 +0000 (12:34 +0400)
commit38f6fcd822103f7e896532239c60c47b8fcc7d22
tree9df182112e865a38da01d98093242139b340eb34
parent338ba2bc806ca1de7da7e55e164e460c1aa3cf88
buffer: fix sign overflow in `readUIn32BE`

`|` operation takes precendence on `+`, which will result in
`new Buffer('ffffffff', 16).readUInt32BE(0)` returning `-1` instead of
`ffffffff`.
lib/buffer.js
test/simple/test-buffer.js