diff --git a/stl/src/mutex.cpp b/stl/src/mutex.cpp index cd44a0044a7..4a35e8c77aa 100644 --- a/stl/src/mutex.cpp +++ b/stl/src/mutex.cpp @@ -147,8 +147,9 @@ static _Thrd_result mtx_do_lock(_Mtx_t mtx, const _timespec64* target) noexcept } _CRTIMP2_PURE _Thrd_result __cdecl _Mtx_unlock(_Mtx_t mtx) noexcept { // unlock mutex + _THREAD_ASSERT(mtx->_Count > 0, "unlock of unowned mutex"); _THREAD_ASSERT( - 1 <= mtx->_Count && mtx->_Thread_id == static_cast(GetCurrentThreadId()), "unlock of unowned mutex"); + mtx->_Thread_id == static_cast(GetCurrentThreadId()), "unlock of mutex not owned by the current thread"); if (--mtx->_Count == 0) { // leave critical section mtx->_Thread_id = -1;