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
... You get an out of range exception, when you try it.
RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= 0 and <= 65535. Received -10
However, it's easy to convert the value to unsigned int 16:
if( value < 0 && value >= -32768){
let b = Buffer.allocUnsafe(2)
b.writeInt16BE(value)
return b.readUInt16BE()
}
This can be a workaround and if implemented also a solution.
The text was updated successfully, but these errors were encountered:
... You get an out of range exception, when you try it.
RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= 0 and <= 65535. Received -10
However, it's easy to convert the value to unsigned int 16:
This can be a workaround and if implemented also a solution.
The text was updated successfully, but these errors were encountered: