From 4de38aef1ef700946ebcf36105de1a4269356409 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 24 Feb 2021 11:18:16 +0000 Subject: [PATCH] Fix issue with DDS writing reading from wrong subresource index for data --- renderdoc/common/dds_readwrite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/common/dds_readwrite.cpp b/renderdoc/common/dds_readwrite.cpp index bf9a0c54b..8d557be80 100644 --- a/renderdoc/common/dds_readwrite.cpp +++ b/renderdoc/common/dds_readwrite.cpp @@ -915,7 +915,7 @@ bool write_dds_to_file(FILE *f, const write_dds_data &data) uint32_t numdepths = RDCMAX(1U, data.depth >> mip); for(uint32_t d = 0; d < numdepths; d++) { - byte *bytedata = data.subresources[d]; + byte *bytedata = data.subresources[i]; uint32_t rowlen = RDCMAX(1U, data.width >> mip); uint32_t numRows = RDCMAX(1U, data.height >> mip);