buffer: fix writeInt{B,L}E for some neg values
The algorithm used to convert negative values to hex generates incorrect values when the low byte(s) of the value are zero because a carried subtraction is applied prematurely. Fixes: https://github.com/nodejs/node/issues/3992 PR-URL: https://github.com/nodejs/node/pull/3994 Reviewed-By:Trevor Norris <trev.norris@gmail.com> Signed-off-by:
Peter A. Bigot <pab@pabigot.com>
parent
e5d97fd9
Please register or sign in to comment