mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 08:26:50 +00:00
[Coverity] Fix some possible divide by 0 cases
This commit is contained in:
@@ -58,7 +58,7 @@ namespace renderdocui.Windows
|
||||
|
||||
private int SliceForString(string s, UInt32 value, UInt32 maximum)
|
||||
{
|
||||
if (value == 0)
|
||||
if (value == 0 || maximum == 0)
|
||||
return 0;
|
||||
|
||||
float ratio = (float)value / maximum;
|
||||
|
||||
Reference in New Issue
Block a user