From 0af452720ecc4ddd2dcdbc1c735301cca6aa54d2 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Tue, 12 Jan 2021 15:06:31 +0300 Subject: [PATCH] RSX: Fix possible bug in memory streaming utils --- rpcs3/Emu/RSX/Common/BufferUtils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/BufferUtils.cpp b/rpcs3/Emu/RSX/Common/BufferUtils.cpp index a6cbf0b922..b1b4b26027 100644 --- a/rpcs3/Emu/RSX/Common/BufferUtils.cpp +++ b/rpcs3/Emu/RSX/Common/BufferUtils.cpp @@ -349,11 +349,11 @@ namespace const u8 attribute_sz = min_block_size >> 2; for (u32 n = 0; n < remainder; ++n) { - //auto src_ptr2 = reinterpret_cast*>(src_ptr); + auto src_ptr2 = reinterpret_cast*>(src_ptr); auto dst_ptr2 = reinterpret_cast(dst_ptr); for (u32 v = 0; v < attribute_sz; ++v) - dst_ptr2[v] = src_ptr[v]; + dst_ptr2[v] = src_ptr2[v]; src_ptr += src_stride; dst_ptr += dst_stride; @@ -415,11 +415,11 @@ namespace const u8 attribute_sz = min_block_size >> 1; for (u32 n = 0; n < remainder; ++n) { - //auto src_ptr2 = reinterpret_cast*>(src_ptr); - //auto dst_ptr2 = reinterpret_cast(dst_ptr); + auto src_ptr2 = reinterpret_cast*>(src_ptr); + auto dst_ptr2 = reinterpret_cast(dst_ptr); for (u32 v = 0; v < attribute_sz; ++v) - dst_ptr[v] = src_ptr[v]; + dst_ptr2[v] = src_ptr2[v]; src_ptr += src_stride; dst_ptr += dst_stride;