diff --git a/renderdoc/driver/vulkan/vk_shaderdebug.cpp b/renderdoc/driver/vulkan/vk_shaderdebug.cpp index ce33b0ac5..435b16372 100644 --- a/renderdoc/driver/vulkan/vk_shaderdebug.cpp +++ b/renderdoc/driver/vulkan/vk_shaderdebug.cpp @@ -408,8 +408,8 @@ public: if(data.width == 0) return rdcspv::DeviceOpResult::Failed; - uint32_t coords[4]; - for(int i = 0; i < 4; i++) + uint32_t coords[4] = {}; + for(int i = 0; i < coord.columns; i++) coords[i] = uintComp(coord, i); if(coords[0] >= data.width || coords[1] >= data.height || coords[2] >= data.depth) @@ -551,8 +551,8 @@ public: if(data.width == 0) return rdcspv::DeviceOpResult::Failed; - uint32_t coords[4]; - for(int i = 0; i < 4; i++) + uint32_t coords[4] = {}; + for(int i = 0; i < coord.columns; i++) coords[i] = uintComp(coord, i); if(coords[0] >= data.width || coords[1] >= data.height || coords[2] >= data.depth)