aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-04-17 17:00:44 +0200
committerEinar Johan Trøan Sømåen2013-04-17 17:00:44 +0200
commit136931d7c7b284135e2e9906b580522c7db73103 (patch)
treebd334250d44dd77165d8ca898f1db93260fa5c3b /engines
parentd7531327d11feaf88eb472dc2d31c47a1e8e016b (diff)
downloadscummvm-rg350-136931d7c7b284135e2e9906b580522c7db73103.tar.gz
scummvm-rg350-136931d7c7b284135e2e9906b580522c7db73103.tar.bz2
scummvm-rg350-136931d7c7b284135e2e9906b580522c7db73103.zip
WINTERMUTE: Avoid div-by-zero in SystemClassRegistry::loadTable
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/system/sys_class_registry.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/wintermute/system/sys_class_registry.cpp b/engines/wintermute/system/sys_class_registry.cpp
index 3e2b8665ee..423161b362 100644
--- a/engines/wintermute/system/sys_class_registry.cpp
+++ b/engines/wintermute/system/sys_class_registry.cpp
@@ -234,7 +234,7 @@ bool SystemClassRegistry::loadTable(BaseGame *gameRef, BasePersistenceManager *p
uint32 numClasses = persistMgr->getDWORD();
for (uint32 i = 0; i < numClasses; i++) {
- gameRef->_renderer->setIndicatorVal((int)(50.0f / (float)((float)numClasses / (float)i)));
+ gameRef->_renderer->setIndicatorVal((int)(50.0f / (float)((float)numClasses / (float)(i + 1))));
Common::String className = persistMgr->getStringObj();
NameMap::iterator mapIt = _nameMap.find(className);