commit 09097c76d0e209832d28158eb51042c60d271b81
parent f78bafd6688c4d9be39cf270f73711e5763d91b4
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date: Thu, 10 Dec 2020 15:37:05 +0100
btl: empty_array() returns true if array is null
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/btl/src/utils.hpp b/btl/src/utils.hpp
@@ -60,7 +60,7 @@
template <typename T, T INVALID=T()>
inline bool empty_array( T* arr )
{
- return arr && *arr == INVALID;
+ return !arr || *arr == INVALID;
}
//like fputs, but when character is blank, prints the C escape instead