Fix memory overwrite when saving a single slice of texture

This commit is contained in:
Jake Turner
2023-08-31 13:26:52 +01:00
parent df1a7cec50
commit 0fed9d5741
+1 -1
View File
@@ -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;