diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-09-30 15:10:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-09-30 15:10:12 -0300 |
commit | f83de8e34e24e30acf277f60de62a33bd51d1ddd (patch) | |
tree | 0d3e2aee12de51c08e93bfc70029943ecc64e257 | |
parent | 9f791535cde1539338f6ba1b9154006595d97fe7 (diff) | |
download | lua-f83de8e34e24e30acf277f60de62a33bd51d1ddd.tar.gz lua-f83de8e34e24e30acf277f60de62a33bd51d1ddd.tar.bz2 lua-f83de8e34e24e30acf277f60de62a33bd51d1ddd.zip |
Wrong cast in 'str_unpack'
-rw-r--r-- | lstrlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1738,7 +1738,7 @@ static int str_unpack (lua_State *L) { | |||
1738 | break; | 1738 | break; |
1739 | } | 1739 | } |
1740 | case Kzstr: { | 1740 | case Kzstr: { |
1741 | size_t len = (int)strlen(data + pos); | 1741 | size_t len = strlen(data + pos); |
1742 | luaL_argcheck(L, pos + len < ld, 2, | 1742 | luaL_argcheck(L, pos + len < ld, 2, |
1743 | "unfinished string for format 'z'"); | 1743 | "unfinished string for format 'z'"); |
1744 | lua_pushlstring(L, data + pos, len); | 1744 | lua_pushlstring(L, data + pos, len); |