From a362d4c48fb2b218c213d841bebcd325c6dfee4b Mon Sep 17 00:00:00 2001 From: david Date: Sat, 5 Mar 2011 21:16:09 +0000 Subject: [PATCH] Fix condvar("signal") when there is nothing waiting on the condvar. The logic was while (unsigned >= 0) which is an infinite loop. --- nse_nmaplib.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc index 41be93cc6..a274933d7 100644 --- a/nse_nmaplib.cc +++ b/nse_nmaplib.cc @@ -321,6 +321,8 @@ static int aux_condvar (lua_State *L) return nse_yield(L, 0, NULL); case SIGNAL: n = lua_objlen(L, lua_upvalueindex(1)); + if (n == 0) + n = 1; break; case BROADCAST: n = 1;