aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-04-17 17:02:09 +0200
committerEinar Johan Trøan Sømåen2013-04-17 17:02:09 +0200
commitc303428f487204fc40c55b4279deb2c6e8afd733 (patch)
treeadbb6cd529d05c8594cfc7d2f497c370c1bea9ca /engines
parent136931d7c7b284135e2e9906b580522c7db73103 (diff)
downloadscummvm-rg350-c303428f487204fc40c55b4279deb2c6e8afd733.tar.gz
scummvm-rg350-c303428f487204fc40c55b4279deb2c6e8afd733.tar.bz2
scummvm-rg350-c303428f487204fc40c55b4279deb2c6e8afd733.zip
WINTERMUTE: Avoid div-by-zero in SystemClassRegistry::loadInstances()
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 423161b362..8a6aae754f 100644
--- a/engines/wintermute/system/sys_class_registry.cpp
+++ b/engines/wintermute/system/sys_class_registry.cpp
@@ -286,7 +286,7 @@ bool SystemClassRegistry::loadInstances(BaseGame *gameRef, BasePersistenceManage
for (int i = 0; i < numInstances; i++) {
if (i % 20 == 0) {
- gameRef->_renderer->setIndicatorVal((int)(50.0f + 50.0f / (float)((float)numInstances / (float)i)));
+ gameRef->_renderer->setIndicatorVal((int)(50.0f + 50.0f / (float)((float)numInstances / (float)(i + 1))));
}
checkHeader("<INSTANCE_HEAD>", persistMgr);