mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
[Coverity] Prevent possible edge-case divide by zero error
This commit is contained in:
@@ -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