nodejs-pack
nodejs-pack copied to clipboard
'f' float unpack fix
while porting an existing php (internal) library to node.js I've noticed that unpacking with 'f' results in rounded values (1.4 -> 1), while php and perl resulted in the correct floating number.
While not being nor a c++ nor a "node internals" expert I've tried this little patch that, in my tests (data is from actual internal test sets), solves the issue.
same problem happens with 'd' double data type, so the same correction is provided while I don't have enough data to test.