mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 01:16:31 +00:00
Only read co-ordinates that exist in parameter. Closes #3885
* ShaderVariable contents are not guaranteed to be 0-initialised outside of their valid range and could contain leftovers from older IDs and calculations.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user