From b1edb69249928d385f462543f3e0fa69d3037d2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Thu, 25 Feb 2021 21:22:01 +0100 Subject: [PATCH] Fix SafeNumeric::conditional_increment() for NO_THREADS --- core/templates/safe_refcount.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/templates/safe_refcount.h b/core/templates/safe_refcount.h index cdc9908a5fb..91a34ecd548 100644 --- a/core/templates/safe_refcount.h +++ b/core/templates/safe_refcount.h @@ -249,7 +249,7 @@ public: } _ALWAYS_INLINE_ T conditional_increment() { - if (value != 0) { + if (value == 0) { return 0; } else { return ++value;