You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found the new commit decodes spaces in string to nulls, as it's done char by char this renders the output incorrectly, one would end up with a string "null" in place of " ".
function rChar() {
c58528c@michaelwittigsupport for nulls, infinity and guid
michaelwittig authored 14 days ago
54 var val = rInt8();
55 if (val === 32) {
56 return null;
57 } else {
58 return String.fromCharCode(val);
59 }
Perhaps there was a rationale to add this in earlier? In any case I'd say the old behaviour is correct.
Thanks
Hui
The text was updated successfully, but these errors were encountered:
Hi Hui,
the emptyChar2null option since v1.0.1 will do what you expect.
varnodeq=require("node-q");nodeq.connect({host: "localhost",port: 5000,emptyChar2null: false},function(err,con){if(err)throwerr;console.log("connected");// interact with con like demonstrated below});
The reason for changing the behaviour in vrsion 1.0.0 is explained here: #13 (comment)
Hey Michael,
Found the new commit decodes spaces in string to nulls, as it's done char by char this renders the output incorrectly, one would end up with a string "null" in place of " ".
c58528c@michaelwittigsupport for nulls, infinity and guid
michaelwittig authored 14 days ago
54 var val = rInt8();
55 if (val === 32) {
56 return null;
57 } else {
58 return String.fromCharCode(val);
59 }
Perhaps there was a rationale to add this in earlier? In any case I'd say the old behaviour is correct.
Thanks
Hui
The text was updated successfully, but these errors were encountered: