From c63fc4e17f0e178938761b5eccb4c5e8861e6261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Wed, 24 Aug 2022 14:26:12 +0200 Subject: [PATCH] Use logical OR instead of bitwise OR in check --- include/boost/container/allocator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/container/allocator.hpp b/include/boost/container/allocator.hpp index 418407e..b245c6f 100644 --- a/include/boost/container/allocator.hpp +++ b/include/boost/container/allocator.hpp @@ -352,7 +352,7 @@ class allocator { std::size_t const preferred_size = prefer_in_recvd_out_size; dlmalloc_command_ret_t ret = {0 , 0}; - if((limit_size > this->max_size()) | (preferred_size > this->max_size())){ + if((limit_size > this->max_size()) || (preferred_size > this->max_size())){ return pointer(); } std::size_t l_size = limit_size*sizeof(T);