From cbff3d27144f6d2c53f800b9bcf20ae15981c8f3 Mon Sep 17 00:00:00 2001 From: BZLZHH Date: Wed, 30 Apr 2025 18:02:49 +0800 Subject: [PATCH] [Improvement] (TextureState.cpp): Use memcpy rather than memmove in UpdateRegion2D. --- MG/MG_GL/State/Texture/TextureState.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MG/MG_GL/State/Texture/TextureState.cpp b/MG/MG_GL/State/Texture/TextureState.cpp index 0f80a072..8c0e9d07 100644 --- a/MG/MG_GL/State/Texture/TextureState.cpp +++ b/MG/MG_GL/State/Texture/TextureState.cpp @@ -417,9 +417,8 @@ GLenum TextureState::UpdateRegion2D(GLenum target, GLint level, GLint xoffset, dstRow[i] = ReverseBits(srcRow[i]); } } else { - MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D memmove(dst=%p, src=%p, size=%zu) called.", dstRow, srcRow, width * bytesPerPixel); - - memmove(dstRow, srcRow, width * bytesPerPixel); + MG_Util::Debug::LogD("MG_State: Texture: UpdateRegion2D memcpy(dst=%p, src=%p, size=%zu) called.", dstRow, srcRow, width * bytesPerPixel); + memcpy(dstRow, srcRow, width * bytesPerPixel); } }