summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2021-02-25 21:22:01 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2021-02-25 21:22:01 +0100
commitb1edb69249928d385f462543f3e0fa69d3037d2a (patch)
treed10534f85266821d803d6343c4111bdc6d0e297f /core
parent2adacd751c9f83f0dbbedcd2d4ce112104e09513 (diff)
Fix SafeNumeric::conditional_increment() for NO_THREADS
Diffstat (limited to 'core')
-rw-r--r--core/templates/safe_refcount.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/templates/safe_refcount.h b/core/templates/safe_refcount.h
index cdc9908a5f..91a34ecd54 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;