diff --git a/include/sol/stack_core.hpp b/include/sol/stack_core.hpp index 1baaf143..51a00302 100644 --- a/include/sol/stack_core.hpp +++ b/include/sol/stack_core.hpp @@ -104,7 +104,7 @@ namespace sol { std::size_t aligned_space_for(void* alignment = nullptr) { // use temporary storage to prevent strict UB shenanigans char alignment_shim[(std::max)({ sizeof(Args)... }) + (std::max)({ alignof(Args)... })] {}; - char* start = alignment == nullptr ? static_cast(alignment) : alignment_shim; + char* start = alignment != nullptr ? static_cast(alignment) : alignment_shim; (void)detail::swallow { int {}, (align_one(std::alignment_of_v, sizeof(Args), alignment), int {})... }; return static_cast(alignment) - start; }