diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-09-07 12:21:46 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2022-09-07 12:21:46 -0300 |
| commit | cd56f222b735a6b2c5392c74904b6c744af2e549 (patch) | |
| tree | 03a2474284046c17073aeeb15fb656f8ee9c35db | |
| parent | 69b77b6fde32cdf5dcaeeb92996bf6c4697e0b4f (diff) | |
| download | lua-cd56f222b735a6b2c5392c74904b6c744af2e549.tar.gz lua-cd56f222b735a6b2c5392c74904b6c744af2e549.tar.bz2 lua-cd56f222b735a6b2c5392c74904b6c744af2e549.zip | |
Corrected error message in 'table.remove'
| -rw-r--r-- | ltablib.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -93,7 +93,7 @@ static int tremove (lua_State *L) { | |||
| 93 | lua_Integer pos = luaL_optinteger(L, 2, size); | 93 | lua_Integer pos = luaL_optinteger(L, 2, size); |
| 94 | if (pos != size) /* validate 'pos' if given */ | 94 | if (pos != size) /* validate 'pos' if given */ |
| 95 | /* check whether 'pos' is in [1, size + 1] */ | 95 | /* check whether 'pos' is in [1, size + 1] */ |
| 96 | luaL_argcheck(L, (lua_Unsigned)pos - 1u <= (lua_Unsigned)size, 1, | 96 | luaL_argcheck(L, (lua_Unsigned)pos - 1u <= (lua_Unsigned)size, 2, |
| 97 | "position out of bounds"); | 97 | "position out of bounds"); |
| 98 | lua_geti(L, 1, pos); /* result = t[pos] */ | 98 | lua_geti(L, 1, pos); /* result = t[pos] */ |
| 99 | for ( ; pos < size; pos++) { | 99 | for ( ; pos < size; pos++) { |
