1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 13:11:28 +00:00

Upgrade 5.2.1 to 5.2.2.

Bugs fixed: http://www.lua.org/bugs.html
This commit is contained in:
batrick
2013-05-02 14:59:06 +00:00
parent 371be36f88
commit 1720606226
32 changed files with 409 additions and 317 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltable.c,v 2.71 2012/05/23 15:37:09 roberto Exp $
** $Id: ltable.c,v 2.72 2012/09/11 19:37:16 roberto Exp $
** Lua tables (hash)
** See Copyright Notice in lua.h
*/
@@ -480,13 +480,13 @@ const TValue *luaH_getstr (Table *t, TString *key) {
*/
const TValue *luaH_get (Table *t, const TValue *key) {
switch (ttype(key)) {
case LUA_TNIL: return luaO_nilobject;
case LUA_TSHRSTR: return luaH_getstr(t, rawtsvalue(key));
case LUA_TNIL: return luaO_nilobject;
case LUA_TNUMBER: {
int k;
lua_Number n = nvalue(key);
lua_number2int(k, n);
if (luai_numeq(cast_num(k), nvalue(key))) /* index is int? */
if (luai_numeq(cast_num(k), n)) /* index is int? */
return luaH_getint(t, k); /* use specialized version */
/* else go through */
}