aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorJohannes Schickel2009-09-24 14:07:02 +0000
committerJohannes Schickel2009-09-24 14:07:02 +0000
commitf2a07d7ae931fa32b609ea03160fcdb13a9cb940 (patch)
tree4fd4a5c94b8eb75fcf83482362560d7716245d64 /engines/sci/engine
parentb2817fdb7d0747cdad92ee42d80ad4fdf5e3be43 (diff)
downloadscummvm-rg350-f2a07d7ae931fa32b609ea03160fcdb13a9cb940.tar.gz
scummvm-rg350-f2a07d7ae931fa32b609ea03160fcdb13a9cb940.tar.bz2
scummvm-rg350-f2a07d7ae931fa32b609ea03160fcdb13a9cb940.zip
Fix what looks like a typo in the condition, which checks for a divide by zero.
svn-id: r44306
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kmath.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp
index cca9e3a6b4..0391316e62 100644
--- a/engines/sci/engine/kmath.cpp
+++ b/engines/sci/engine/kmath.cpp
@@ -128,7 +128,7 @@ reg_t kCosDiv(EngineState *s, int, int argc, reg_t *argv) {
int value = argv[1].toSint16();
double cosval = cos(angle * PI / 180.0);
- if ((cosval < 0.0001) && (cosval > 0.0001)) {
+ if ((cosval < 0.0001) && (cosval > -0.0001)) {
warning("Attepted division by zero");
return make_reg(0, 0);
} else
@@ -140,7 +140,7 @@ reg_t kSinDiv(EngineState *s, int, int argc, reg_t *argv) {
int value = argv[1].toSint16();
double sinval = sin(angle * PI / 180.0);
- if ((sinval < 0.0001) && (sinval > 0.0001)) {
+ if ((sinval < 0.0001) && (sinval > -0.0001)) {
warning("Attepted division by zero");
return make_reg(0, 0);
} else