DIRECTOR: LINGO: Fix reference->number conversion

This commit is contained in:
djsrv 2020-06-19 16:48:44 -04:00
parent 3d36728754
commit a3a6988178

View file

@ -714,8 +714,6 @@ int Datum::asInt() {
int res = 0;
switch (type) {
case REFERENCE:
// fallthrough
case STRING:
{
Common::String src = asString();
@ -732,6 +730,7 @@ int Datum::asInt() {
// no-op
break;
case INT:
case REFERENCE:
res = u.i;
break;
case FLOAT:
@ -748,8 +747,6 @@ double Datum::asFloat() {
double res = 0.0;
switch (type) {
case REFERENCE:
// fallthrough
case STRING:
{
Common::String src = asString();
@ -766,6 +763,7 @@ double Datum::asFloat() {
// no-op
break;
case INT:
case REFERENCE:
res = (double)u.i;
break;
case FLOAT: