From d73ebf5c5542f079445b10a8677e241ec47ecd1b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 22 Feb 2017 12:22:00 +0100 Subject: DIRECTOR: Lingo: Fixed float constants processing --- engines/director/lingo/lingo-code.cpp | 2 +- engines/director/lingo/lingo-codegen.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp index 89650745ac..fbee0d8360 100644 --- a/engines/director/lingo/lingo-code.cpp +++ b/engines/director/lingo/lingo-code.cpp @@ -212,7 +212,7 @@ void Lingo::c_voidpush() { void Lingo::c_fconstpush() { Datum d; inst i = (*g_lingo->_currentScript)[g_lingo->_pc]; - d.u.i = READ_UINT32(&i); // d.u.f value will be read + d.u.f = *(double *)(&i); d.type = FLOAT; g_lingo->_pc += g_lingo->calcCodeAlignment(sizeof(double)); diff --git a/engines/director/lingo/lingo-codegen.cpp b/engines/director/lingo/lingo-codegen.cpp index 8fa787bd33..8347d934b1 100644 --- a/engines/director/lingo/lingo-codegen.cpp +++ b/engines/director/lingo/lingo-codegen.cpp @@ -103,7 +103,7 @@ Common::String Lingo::decodeInstruction(uint pc, uint *newPc) { { Datum d; i = (*_currentScript)[pc++]; - d.u.i = READ_UINT32(&i); + d.u.f = *(double *)(&i); res += Common::String::format(" %f", d.u.f); break; -- cgit v1.2.3