node-red-contrib-buffer-parser icon indicating copy to clipboard operation
node-red-contrib-buffer-parser copied to clipboard

Is type double here 4 bytes or 8 bytes?

Open thkfighter opened this issue 2 years ago • 1 comments

Ubuntu 22.04 Node-RED 3.1.3 node v20.10.0

I am parsing a buffer with lots of double values, which are 8-byte IEEE754Double. I add double(le) items to node buffer-parser, but it seems that they are 4 bytes long. Screenshot from 2023-12-23 23-45-03

thkfighter avatar Dec 23 '23 15:12 thkfighter

@thkfighter

double is a 64 bit (8 byte) value.

All types in the node use/adhere to the NodeJS buffer specification: https://nodejs.org/api/buffer.html#bufreaddoublebeoffset

There looks to be a bug in the auto calculate next offset.

Just adjust your offsets manually until it is fixed :)

Steve-Mcl avatar Dec 23 '23 16:12 Steve-Mcl