Wrong cast in 'str_unpack'

This commit is contained in:
Roberto Ierusalimschy 2020-09-30 15:10:12 -03:00
parent 9f791535cd
commit f83de8e34e
1 changed files with 1 additions and 1 deletions

View File

@ -1738,7 +1738,7 @@ static int str_unpack (lua_State *L) {
break;
}
case Kzstr: {
size_t len = (int)strlen(data + pos);
size_t len = strlen(data + pos);
luaL_argcheck(L, pos + len < ld, 2,
"unfinished string for format 'z'");
lua_pushlstring(L, data + pos, len);