Dear Gustaf,
thank you for fixing the code!
Trying to answer your question, I believe that yes the problem was there, hidden in the code, but that it actually got exposed only recently (24th of January) when in the file winthread.c the following two lines
wait.usec /= 1000;
if (wait.sec < 0 || (wait.sec == 0 && wait.usec <= 0)) {
got changed into
msec = Ns_TimeToMilliseconds(&wait);
if (msec < 0) {
So the function Ns_TimeToMilliseconds got called and the problem exposed.
Again thank you,
Maurizio