We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 603ebb2 commit 40d13d1Copy full SHA for 40d13d1
deps/lua/src/lua_bit.c
@@ -131,6 +131,7 @@ static int bit_tohex(lua_State *L)
131
const char *hexdigits = "0123456789abcdef";
132
char buf[8];
133
int i;
134
+ if (n == INT32_MIN) n = INT32_MIN+1;
135
if (n < 0) { n = -n; hexdigits = "0123456789ABCDEF"; }
136
if (n > 8) n = 8;
137
for (i = (int)n; --i >= 0; ) { buf[i] = hexdigits[b & 15]; b >>= 4; }
0 commit comments