mirror of
https://github.com/nmap/nmap.git
synced 2025-12-25 00:49:01 +00:00
Updated to Lua 5.1.3 (Bug fix release)
Updated stdnse to include tobinary, toocal, and tohex functions. Minor optimizations to listop.lua
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: ltable.c,v 2.32 2006/01/18 11:49:02 roberto Exp $
|
||||
** $Id: ltable.c,v 2.32.1.2 2007/12/28 15:32:23 roberto Exp $
|
||||
** Lua tables (hash)
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -84,8 +84,8 @@ static const Node dummynode_ = {
|
||||
static Node *hashnum (const Table *t, lua_Number n) {
|
||||
unsigned int a[numints];
|
||||
int i;
|
||||
n += 1; /* normalize number (avoid -0) */
|
||||
lua_assert(sizeof(a) <= sizeof(n));
|
||||
if (luai_numeq(n, 0)) /* avoid problems with -0 */
|
||||
return gnode(t, 0);
|
||||
memcpy(a, &n, sizeof(a));
|
||||
for (i = 1; i < numints; i++) a[0] += a[i];
|
||||
return hashmod(t, a[0]);
|
||||
|
||||
Reference in New Issue
Block a user