michaelwittig / node-q

Q interfacing with Node.js
MIT License
52 stars 14 forks source link

issue parsing negative number #9

Closed komsit37 closed 8 years ago

komsit37 commented 8 years ago

Hi Michael,

Thanks for your work. I've played around with the module a bit and found this issue. It seems node-q cannot parse negative no. from kdb (-1j, or -1i) I'm getting 18446744073709552000 instead

This is how to reproduce

var nodeq = require('node-q');

 nodeq.connect({host: 'localhost', port: 5555}, function(err, con) {
    con.k('-1j', function(err, response) {
        console.log(response);
    });
});
//output
//18446744073709552000
//'-1i' is also returning 4294967295

I'm using kdb 3.3 32bit on windows

C:\q>q -p 5555
KDB+ 3.3 2015.07.09 Copyright (C) 1993-2015 Kx Systems

Komsit

michaelwittig commented 8 years ago

Hi Komsit,

thanks for your issue report. I added an integration test to validate your issue and it seems to be a problem for negative short, int and long values (which is quiet a big issue!). I will provide a fix soon.

Thanks Michael

michaelwittig commented 8 years ago

releases as version 0.12.1

komsit37 commented 8 years ago

Wow, that was quick. Thanks!