Added missing casts from lua_Unsigned to size_t
size_t can be smaller than lua_Usigned.
This commit is contained in:
@@ -1811,8 +1811,8 @@ static int str_unpack (lua_State *L) {
|
|||||||
lua_Unsigned len = (lua_Unsigned)unpackint(L, data + pos,
|
lua_Unsigned len = (lua_Unsigned)unpackint(L, data + pos,
|
||||||
h.islittle, cast_int(size), 0);
|
h.islittle, cast_int(size), 0);
|
||||||
luaL_argcheck(L, len <= ld - pos - size, 2, "data string too short");
|
luaL_argcheck(L, len <= ld - pos - size, 2, "data string too short");
|
||||||
lua_pushlstring(L, data + pos + size, len);
|
lua_pushlstring(L, data + pos + size, cast_sizet(len));
|
||||||
pos += len; /* skip string */
|
pos += cast_sizet(len); /* skip string */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Kzstr: {
|
case Kzstr: {
|
||||||
|
|||||||
Reference in New Issue
Block a user