mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
fix error log
This commit is contained in:
@@ -589,11 +589,11 @@ read64(lua_State *L, uint32_t xx[2], uint32_t yy[2]) {
|
|||||||
size_t sz = 0;
|
size_t sz = 0;
|
||||||
const uint8_t *x = (const uint8_t *)luaL_checklstring(L, 1, &sz);
|
const uint8_t *x = (const uint8_t *)luaL_checklstring(L, 1, &sz);
|
||||||
if (sz != 8) {
|
if (sz != 8) {
|
||||||
luaL_error(L, "Invalid hmac x");
|
luaL_error(L, "Invalid uint64 x");
|
||||||
}
|
}
|
||||||
const uint8_t *y = (const uint8_t *)luaL_checklstring(L, 2, &sz);
|
const uint8_t *y = (const uint8_t *)luaL_checklstring(L, 2, &sz);
|
||||||
if (sz != 8) {
|
if (sz != 8) {
|
||||||
luaL_error(L, "Invalid hmac y");
|
luaL_error(L, "Invalid uint64 y");
|
||||||
}
|
}
|
||||||
xx[0] = x[0] | x[1]<<8 | x[2]<<16 | x[3]<<24;
|
xx[0] = x[0] | x[1]<<8 | x[2]<<16 | x[3]<<24;
|
||||||
xx[1] = x[4] | x[5]<<8 | x[6]<<16 | x[7]<<24;
|
xx[1] = x[4] | x[5]<<8 | x[6]<<16 | x[7]<<24;
|
||||||
@@ -703,7 +703,7 @@ ldhexchange(lua_State *L) {
|
|||||||
size_t sz = 0;
|
size_t sz = 0;
|
||||||
const uint8_t *x = (const uint8_t *)luaL_checklstring(L, 1, &sz);
|
const uint8_t *x = (const uint8_t *)luaL_checklstring(L, 1, &sz);
|
||||||
if (sz != 8) {
|
if (sz != 8) {
|
||||||
luaL_error(L, "Invalid hmac x");
|
luaL_error(L, "Invalid dh uint64 key");
|
||||||
}
|
}
|
||||||
uint32_t xx[2];
|
uint32_t xx[2];
|
||||||
xx[0] = x[0] | x[1]<<8 | x[2]<<16 | x[3]<<24;
|
xx[0] = x[0] | x[1]<<8 | x[2]<<16 | x[3]<<24;
|
||||||
|
|||||||
Reference in New Issue
Block a user