We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91b7cce commit ecdb2f6Copy full SHA for ecdb2f6
include/cppcore/Memory/MemUtils.h
@@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
-----------------------------------------------------------------------------------------------*/
23
#pragma once
24
25
-#include <cppcore//CPPCoreCommon.h>
+#include <cppcore/CPPCoreCommon.h>
26
#include <string.h>
27
#include <cinttypes>
28
@@ -78,6 +78,9 @@ inline bool MemUtils::isAligned(const void *ptr, size_t align) {
78
}
79
80
inline const void *MemUtils::alignPtr(void *ptr, size_t extra, size_t align) {
81
+ if (align == 0) {
82
+ return nullptr;
83
+ }
84
union {
85
const void *mPtr;
86
uintptr_t mAddr;
0 commit comments