Comparing version 1.5.0 to 1.6.0
@@ -165,3 +165,3 @@ | ||
buf = new Buffer(1) | ||
buf[0] = 0xe0 | -obj | ||
buf[0] = 0x100 + obj | ||
} else if (obj >= -128) { | ||
@@ -400,3 +400,3 @@ buf = new Buffer(2) | ||
// 5 bits negative ints | ||
result = -(~0xe0 & first) | ||
result = first - 0x100 | ||
return buildDecodeResult(result, 1) | ||
@@ -403,0 +403,0 @@ } else if (first < 0x80) { |
{ | ||
"name": "msgpack5", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "A msgpack v5 implementation for node.js and the browser, with extension points", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,3 +18,3 @@ | ||
t.equal(buf.length, 1, 'must have 1 byte') | ||
t.equal(- (~0xe0 & buf[0]), num, 'must decode correctly'); | ||
t.equal(buf[0], num + 0x100, 'must encode correctly'); | ||
t.end() | ||
@@ -24,3 +24,3 @@ }) | ||
t.test('decoding' + num, function(t) { | ||
var buf = new Buffer([0xe0 | -num]) | ||
var buf = new Buffer([num + 0x100]) | ||
t.equal(encoder.decode(buf), num, 'must decode correctly'); | ||
@@ -27,0 +27,0 @@ t.end() |
@@ -22,3 +22,3 @@ | ||
t.test('decoding' + num, function(t) { | ||
t.test('decoding ' + num, function(t) { | ||
var buf = new Buffer([num]) | ||
@@ -25,0 +25,0 @@ t.equal(encoder.decode(buf), num, 'must decode correctly'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
410156