From 0fed9d574143d53b91f240f28f9632b1b9b70587 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Thu, 31 Aug 2023 13:26:52 +0100 Subject: [PATCH] Fix memory overwrite when saving a single slice of texture --- renderdoc/replay/replay_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/replay/replay_controller.cpp b/renderdoc/replay/replay_controller.cpp index d5a0f5fc3..90a7118a4 100644 --- a/renderdoc/replay/replay_controller.cpp +++ b/renderdoc/replay/replay_controller.cpp @@ -908,7 +908,7 @@ ResultDetails ReplayController::SaveTexture(const TextureSave &saveData, const r { byte *depthslice = new byte[mipSlicePitch]; byte *b = data.data() + mipSlicePitch * sliceOffset; - memcpy(depthslice, b, slicePitch); + memcpy(depthslice, b, mipSlicePitch); subdata.push_back(depthslice); continue;