[Coverity] Fix some possible divide by 0 cases

This commit is contained in:
baldurk
2016-09-14 18:28:51 +02:00
parent 361498a735
commit 3ce3fbe025
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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;