diff options
author | Einar Johan Trøan Sømåen | 2013-04-17 17:00:44 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-04-17 17:00:44 +0200 |
commit | 136931d7c7b284135e2e9906b580522c7db73103 (patch) | |
tree | bd334250d44dd77165d8ca898f1db93260fa5c3b /engines/wintermute/system/sys_class_registry.cpp | |
parent | d7531327d11feaf88eb472dc2d31c47a1e8e016b (diff) | |
download | scummvm-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/wintermute/system/sys_class_registry.cpp')
-rw-r--r-- | engines/wintermute/system/sys_class_registry.cpp | 2 |
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); |