diff options
| -rw-r--r-- | lstrlib.c | 4 | ||||
| -rw-r--r-- | lundump.c | 2 |
2 files changed, 3 insertions, 3 deletions
| @@ -1811,8 +1811,8 @@ static int str_unpack (lua_State *L) { | |||
| 1811 | lua_Unsigned len = (lua_Unsigned)unpackint(L, data + pos, | 1811 | lua_Unsigned len = (lua_Unsigned)unpackint(L, data + pos, |
| 1812 | h.islittle, cast_int(size), 0); | 1812 | h.islittle, cast_int(size), 0); |
| 1813 | luaL_argcheck(L, len <= ld - pos - size, 2, "data string too short"); | 1813 | luaL_argcheck(L, len <= ld - pos - size, 2, "data string too short"); |
| 1814 | lua_pushlstring(L, data + pos + size, len); | 1814 | lua_pushlstring(L, data + pos + size, cast_sizet(len)); |
| 1815 | pos += len; /* skip string */ | 1815 | pos += cast_sizet(len); /* skip string */ |
| 1816 | break; | 1816 | break; |
| 1817 | } | 1817 | } |
| 1818 | case Kzstr: { | 1818 | case Kzstr: { |
| @@ -109,7 +109,7 @@ static lua_Unsigned loadVarint (LoadState *S, lua_Unsigned limit) { | |||
| 109 | 109 | ||
| 110 | 110 | ||
| 111 | static size_t loadSize (LoadState *S) { | 111 | static size_t loadSize (LoadState *S) { |
| 112 | return loadVarint(S, MAX_SIZE); | 112 | return cast_sizet(loadVarint(S, MAX_SIZE)); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | 115 | ||
