aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/director/lingo/lingo-code.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 2c797194c7..2f0e554880 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -207,7 +207,13 @@ void Lingo::c_eval() {
return;
d.type = d.u.sym->type;
- d.u.i = d.u.sym->u.val;
+
+ if (d.u.sym->type == INT)
+ d.u.i = d.u.sym->u.val;
+ else if (d.u.sym->type == FLOAT)
+ d.u.f = d.u.sym->u.fval;
+ else if (d.u.sym->type == STRING)
+ d.u.s = new Common::String(*d.u.sym->u.str);
g_lingo->push(d);
}