mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-08 13:21:45 +00:00
[Coverity] Prevent possible edge-case divide by zero error
This commit is contained in:
1 parent
74d8f66359
commit
b7472e4397
1 file changed
+3
@@ -452,6 +452,9 @@ namespace renderdocui.Controls
|
||||
}
|
||||
}
|
||||
|
||||
if (maxval == 0)
|
||||
maxval = 1;
|
||||
|
||||
for (int i = 0; i < HistogramData.Length; i++)
|
||||
{
|
||||
float x = (float)i / (float)HistogramData.Length;
|
||||
|
||||
Reference in new issue
Block a user