[Scummvm-git-logs] scummvm master -> a7624e80e66a6170b4af52b4987754a0d29b6297
djsrv
dservilla at gmail.com
Mon Jun 22 16:40:08 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
85e5a0ddc7 DIRECTOR: LINGO: Fix float->float cast
a7624e80e6 DIRECTOR: LINGO: Fix reference comparison
Commit: 85e5a0ddc79ca0512c39cfd28b7806ae1d387744
https://github.com/scummvm/scummvm/commit/85e5a0ddc79ca0512c39cfd28b7806ae1d387744
Author: djsrv (dservilla at gmail.com)
Date: 2020-06-22T12:34:34-04:00
Commit Message:
DIRECTOR: LINGO: Fix float->float cast
Changed paths:
engines/director/lingo/lingo.cpp
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index e5d573e613..55fbab8a2e 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -767,7 +767,7 @@ double Datum::asFloat() {
res = (double)u.i;
break;
case FLOAT:
- // no-op
+ res = u.f;
break;
default:
warning("Incorrect operation makeFloat() for type: %s", type2str());
Commit: a7624e80e66a6170b4af52b4987754a0d29b6297
https://github.com/scummvm/scummvm/commit/a7624e80e66a6170b4af52b4987754a0d29b6297
Author: djsrv (dservilla at gmail.com)
Date: 2020-06-22T12:36:28-04:00
Commit Message:
DIRECTOR: LINGO: Fix reference comparison
Changed paths:
engines/director/lingo/lingo.cpp
diff --git a/engines/director/lingo/lingo.cpp b/engines/director/lingo/lingo.cpp
index 55fbab8a2e..dc4d61cc25 100644
--- a/engines/director/lingo/lingo.cpp
+++ b/engines/director/lingo/lingo.cpp
@@ -633,7 +633,7 @@ int Lingo::getAlignedType(Datum &d1, Datum &d2) {
int d1Type = d1.type;
int d2Type = d2.type;
- if (d1Type == STRING || d1Type == REFERENCE) {
+ if (d1Type == STRING) {
Common::String src = d1.asString();
char *endPtr = 0;
strtod(src.c_str(), &endPtr);
@@ -641,7 +641,7 @@ int Lingo::getAlignedType(Datum &d1, Datum &d2) {
d1Type = FLOAT;
}
}
- if (d2Type == STRING || d2Type == REFERENCE) {
+ if (d2Type == STRING) {
Common::String src = d1.asString();
char *endPtr = 0;
strtod(src.c_str(), &endPtr);
@@ -658,7 +658,7 @@ int Lingo::getAlignedType(Datum &d1, Datum &d2) {
if (d1Type == FLOAT || d2Type == FLOAT) {
opType = FLOAT;
- } else if (d1Type == INT && d2Type == INT) {
+ } else if ((d1Type == INT || d1Type == REFERENCE) && (d2Type == INT || d2Type == REFERENCE)) {
opType = INT;
}
More information about the Scummvm-git-logs
mailing list