Avoid a division by zero.

Doing a cache profile on an unused cache wasn't nice.
This commit is contained in:
Bill Currie 2012-01-23 16:46:52 +09:00
parent 7bfddd7ffe
commit e3f76de898

View file

@ -810,7 +810,8 @@ Cache_Profile (void)
(sizes[i] * 100) / total);
}
Sys_Printf ("Total allocations: %d in %d allocations, average of"
" %d per allocation\n", total, count, total / count);
" %d per allocation\n", total, count,
count ? total / count : -1);
}
static void