aboutsummaryrefslogtreecommitdiff
path: root/ltablib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-21 10:52:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-21 10:52:33 -0300
commitda4811238ab48446545621389cb07051982a8279 (patch)
tree56b1a056b383cb09295630e835ad12211036bd6d /ltablib.c
parentf96872a534f1d10788d5607d634cc77e25a887ff (diff)
downloadlua-da4811238ab48446545621389cb07051982a8279.tar.gz
lua-da4811238ab48446545621389cb07051982a8279.tar.bz2
lua-da4811238ab48446545621389cb07051982a8279.zip
details (typos in comments)
Diffstat (limited to 'ltablib.c')
-rw-r--r--ltablib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ltablib.c b/ltablib.c
index 50c506e3..09fe8491 100644
--- a/ltablib.c
+++ b/ltablib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltablib.c,v 1.64 2013/02/06 18:29:03 roberto Exp roberto $ 2** $Id: ltablib.c,v 1.65 2013/03/07 18:17:24 roberto Exp roberto $
3** Library for Table Manipulation 3** Library for Table Manipulation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -140,7 +140,7 @@ static int unpack (lua_State *L) {
140 e = luaL_opt(L, luaL_checkint, 3, luaL_len(L, 1)); 140 e = luaL_opt(L, luaL_checkint, 3, luaL_len(L, 1));
141 if (i > e) return 0; /* empty range */ 141 if (i > e) return 0; /* empty range */
142 n = e - i + 1; /* number of elements */ 142 n = e - i + 1; /* number of elements */
143 if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arith. overflow */ 143 if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arithmetic overflow */
144 return luaL_error(L, "too many results to unpack"); 144 return luaL_error(L, "too many results to unpack");
145 lua_rawgeti(L, 1, i); /* push arg[i] (avoiding overflow problems) */ 145 lua_rawgeti(L, 1, i); /* push arg[i] (avoiding overflow problems) */
146 while (i++ < e) /* push arg[i + 1...e] */ 146 while (i++ < e) /* push arg[i + 1...e] */