Browse Source

Merged in Nixola/love/Nixola/reversed-alignedmalloc-return-value-posi-1512135128149 (pull request #101)

Reversed alignedMalloc return value.

--HG--
branch : minor
Alex Szpakowski 7 years ago
parent
commit
0c1c78fe29
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/common/memory.cpp

+ 1 - 1
src/common/memory.cpp

@@ -38,7 +38,7 @@ bool alignedMalloc(void **mem, size_t size, size_t alignment)
 	*mem = _aligned_malloc(size, alignment);
 	*mem = _aligned_malloc(size, alignment);
 	return *mem != nullptr;
 	return *mem != nullptr;
 #else
 #else
-	return posix_memalign(mem, alignment, size) != 0;
+	return posix_memalign(mem, alignment, size) == 0;
 #endif
 #endif
 }
 }