1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Fix condvar("signal") when there is nothing waiting on the condvar. The

logic was
  while (unsigned >= 0)
which is an infinite loop.
This commit is contained in:
david
2011-03-05 21:16:09 +00:00
parent 6399fe23c3
commit a362d4c48f

View File

@@ -321,6 +321,8 @@ static int aux_condvar (lua_State *L)
return nse_yield(L, 0, NULL); return nse_yield(L, 0, NULL);
case SIGNAL: case SIGNAL:
n = lua_objlen(L, lua_upvalueindex(1)); n = lua_objlen(L, lua_upvalueindex(1));
if (n == 0)
n = 1;
break; break;
case BROADCAST: case BROADCAST:
n = 1; n = 1;