waveto/node-tyrant

addint/packInt packs integers incorrectly

Closed this issue · 1 comments

The following code should output "Count : 11000" but incorrectly outputs "Count : 236268280"

var tyrant = require("./tyrant");
var sys = require('sys');

var c = tyrant.connect();
c.addListener("connect", function (){
  c.addint('count', 11000).addCallback(function(value) {
    sys.puts('Count : '+value);
    c.quit();
  });
});

Seems this was due to a bug in packInt - now fixed.