diff --git a/modules/juce_core/threads/juce_Thread.h b/modules/juce_core/threads/juce_Thread.h index 8b9fd7c96e..94abaea6e9 100644 --- a/modules/juce_core/threads/juce_Thread.h +++ b/modules/juce_core/threads/juce_Thread.h @@ -84,7 +84,7 @@ public: [[nodiscard]] RealtimeOptions withPriority (int newPriority) const { jassert (isPositiveAndNotGreaterThan (newPriority, 10)); - return withMember (*this, &RealtimeOptions::priority, juce::jlimit (newPriority, 0, 10)); + return withMember (*this, &RealtimeOptions::priority, juce::jlimit (0, 10, newPriority)); } /** Specify the expected amount of processing time required each time the thread wakes up.