aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-09-30 15:10:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2020-09-30 15:10:12 -0300
commitf83de8e34e24e30acf277f60de62a33bd51d1ddd (patch)
tree0d3e2aee12de51c08e93bfc70029943ecc64e257
parent9f791535cde1539338f6ba1b9154006595d97fe7 (diff)
downloadlua-f83de8e34e24e30acf277f60de62a33bd51d1ddd.tar.gz
lua-f83de8e34e24e30acf277f60de62a33bd51d1ddd.tar.bz2
lua-f83de8e34e24e30acf277f60de62a33bd51d1ddd.zip
Wrong cast in 'str_unpack'
-rw-r--r--lstrlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 2ba8bde4..a30ec5af 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -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);