You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by ns...@apache.org on 2016/03/29 19:48:39 UTC
[5/9] thrift git commit: THRIFT-3763 Fix serialization of i64 larger
than 2^53 for browserify
THRIFT-3763 Fix serialization of i64 larger than 2^53 for browserify
This closes #968
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/abbc8d0e
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/abbc8d0e
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/abbc8d0e
Branch: refs/heads/master
Commit: abbc8d0ec19850f7ce1125a7f8b1fc9878aac052
Parents: eb344a8
Author: Nobuaki Sukegawa <ns...@apache.org>
Authored: Fri Mar 25 09:49:39 2016 +0900
Committer: Nobuaki Sukegawa <ns...@apache.org>
Committed: Tue Mar 29 12:03:34 2016 +0900
----------------------------------------------------------------------
lib/nodejs/lib/thrift/int64_util.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/abbc8d0e/lib/nodejs/lib/thrift/int64_util.js
----------------------------------------------------------------------
diff --git a/lib/nodejs/lib/thrift/int64_util.js b/lib/nodejs/lib/thrift/int64_util.js
index ecba439..e8d707d 100644
--- a/lib/nodejs/lib/thrift/int64_util.js
+++ b/lib/nodejs/lib/thrift/int64_util.js
@@ -40,7 +40,7 @@ Int64Util.toDecimalString = function(i64) {
var incremented = false;
var buffer = new Buffer(8);
for (var i = 7; i >= 0; --i) {
- buffer[i] = ~b[o + i] + (incremented ? 0 : 1);
+ buffer[i] = (~b[o + i] + (incremented ? 0 : 1)) & 0xff;
incremented |= b[o + i];
}
b = buffer;