From 70407fe357632124cb8fb94a8710431816e530ee Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 20 Oct 2025 16:03:52 +0200 Subject: [PATCH] R_FlushQuad: also check "source" for alignment --- src/r_draw_flush.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_draw_flush.cpp b/src/r_draw_flush.cpp index 1382c3ec1..bc88ccca4 100644 --- a/src/r_draw_flush.cpp +++ b/src/r_draw_flush.cpp @@ -156,8 +156,8 @@ static void R_FlushQuad(void) if constexpr (Type & ColumnFlushType::FLUSH_OPAQUE) { - // aligned copy -- make sure our dest ptr AND viewwidth are a multiple of 8! - if (((uintptr_t)dest & 7) == 0 && (stride & 7) == 0) + // 8 byte aligned copy -- make sure our dest ptr, source ptr AND stride are a multiple of 8! + if ((((uintptr_t)dest | (uintptr_t)source | stride) & 7) == 0) { const INT64 *source64 = reinterpret_cast(source); INT64 *dest64 = reinterpret_cast(dest);