diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-06-15 11:18:40 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-06-15 11:18:40 -0300 |
commit | 2c107e13a8234ea16f0331fe0ff53b784af2bdc1 (patch) | |
tree | fa67d6c13eca3e218bd48b3065546ca02375cf8a | |
parent | 6e600695f8398843a156ce02023f731c6d687ae8 (diff) | |
download | lua-2c107e13a8234ea16f0331fe0ff53b784af2bdc1.tar.gz lua-2c107e13a8234ea16f0331fe0ff53b784af2bdc1.tar.bz2 lua-2c107e13a8234ea16f0331fe0ff53b784af2bdc1.zip |
warning (comparison between signed and unsigned integers)
-rw-r--r-- | ltable.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.138 2018/06/01 16:51:34 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.139 2018/06/15 14:14:20 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -681,7 +681,8 @@ const TValue *luaH_getint (Table *t, lua_Integer key) { | |||
681 | if (l_castS2U(key) - 1u < t->alimit) /* (1 <= key && key <= t->alimit)? */ | 681 | if (l_castS2U(key) - 1u < t->alimit) /* (1 <= key && key <= t->alimit)? */ |
682 | return &t->array[key - 1]; | 682 | return &t->array[key - 1]; |
683 | else if (!limitequalsasize(t) && /* key still may be in the array part? */ | 683 | else if (!limitequalsasize(t) && /* key still may be in the array part? */ |
684 | (key == t->alimit + 1 || l_castS2U(key) - 1u < luaH_realasize(t))) { | 684 | (l_castS2U(key) == t->alimit + 1 || |
685 | l_castS2U(key) - 1u < luaH_realasize(t))) { | ||
685 | t->alimit = cast_uint(key); /* probably '#t' is here now */ | 686 | t->alimit = cast_uint(key); /* probably '#t' is here now */ |
686 | return &t->array[key - 1]; | 687 | return &t->array[key - 1]; |
687 | } | 688 | } |