aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo
diff options
context:
space:
mode:
authorScott Percival2019-12-22 17:08:33 +0800
committerScott Percival2019-12-23 08:58:14 +0800
commit9bbacd05398cb824c5b2c88991151968a17bdb62 (patch)
treeb3adae343ead9b6231cad08f8dec734c5f31a35d /engines/director/lingo
parentafea3787149f805be9925e5843405ceb0c2955a3 (diff)
downloadscummvm-rg350-9bbacd05398cb824c5b2c88991151968a17bdb62.tar.gz
scummvm-rg350-9bbacd05398cb824c5b2c88991151968a17bdb62.tar.bz2
scummvm-rg350-9bbacd05398cb824c5b2c88991151968a17bdb62.zip
DIRECTOR: LINGO: String equality is case insensitive
Diffstat (limited to 'engines/director/lingo')
-rw-r--r--engines/director/lingo/lingo-code.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 458d11a888..2157f3e190 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -818,7 +818,7 @@ void Lingo::c_eq() {
Datum d1 = g_lingo->pop();
if (d1.type == STRING && d2.type == STRING) {
- d1.u.i = (*d1.u.s == *d2.u.s) ? 1 : 0;
+ d1.u.i = (d1.u.s->equalsIgnoreCase(*d2.u.s)) ? 1 : 0;
d1.type = INT;
} else if (g_lingo->alignTypes(d1, d2) == FLOAT) {
d1.u.i = (d1.u.f == d2.u.f) ? 1 : 0;
@@ -834,7 +834,7 @@ void Lingo::c_neq() {
Datum d1 = g_lingo->pop();
if (d1.type == STRING && d2.type == STRING) {
- d1.u.i = (*d1.u.s != *d2.u.s) ? 1 : 0;
+ d1.u.i = !(d1.u.s->equalsIgnoreCase(*d2.u.s)) ? 1 : 0;
d1.type = INT;
} else if (g_lingo->alignTypes(d1, d2) == FLOAT) {
d1.u.i = (d1.u.f != d2.u.f) ? 1 : 0;