diff --git a/src/thread/thread_os2.cpp b/src/thread/thread_os2.cpp index 56f86275d1..a6aa944b67 100644 --- a/src/thread/thread_os2.cpp +++ b/src/thread/thread_os2.cpp @@ -133,7 +133,7 @@ public: this->EndCritical(); DosWaitEventSem(event, SEM_INDEFINITE_WAIT); this->BeginCritical(); - this->recursive_count = this->recursive_count; + this->recursive_count = old_recursive_count; } /* virtual */ void SendSignal() diff --git a/src/thread/thread_win32.cpp b/src/thread/thread_win32.cpp index d002ddb88d..6f9172f2f7 100644 --- a/src/thread/thread_win32.cpp +++ b/src/thread/thread_win32.cpp @@ -146,7 +146,7 @@ public: this->EndCritical(); WaitForSingleObject(this->event, INFINITE); this->BeginCritical(); - this->recursive_count = this->recursive_count; + this->recursive_count = old_recursive_count; } /* virtual */ void SendSignal()