Throw when handling greater than 52-bit integers
Closed this issue · 2 comments
Dekkonot commented
All Lua numbers are doubles, which are only accurate to 52 bits. Writing or reading an integer greater than that (either signed or unsigned) should error.
Dekkonot commented
If we're going to do this, we may as well do it properly and have it throw. It's a footgun to use integers greater than 2^53 in Lua anyway.
Dekkonot commented
On second thought, this feels unfriendly. If someone is using writeUnsigned/writeSigned, they know what they're getting into.