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;