diff options
author | Eugene Sandulenko | 2017-02-22 12:22:00 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-02-22 12:22:00 +0100 |
commit | d73ebf5c5542f079445b10a8677e241ec47ecd1b (patch) | |
tree | 381cc23131d3b7db0a2558eecc71b2e2a0607a40 /engines/director | |
parent | 9dfb8ffd12742dcd29fdff15b6d9bc73ed333f85 (diff) | |
download | scummvm-rg350-d73ebf5c5542f079445b10a8677e241ec47ecd1b.tar.gz scummvm-rg350-d73ebf5c5542f079445b10a8677e241ec47ecd1b.tar.bz2 scummvm-rg350-d73ebf5c5542f079445b10a8677e241ec47ecd1b.zip |
DIRECTOR: Lingo: Fixed float constants processing
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/lingo/lingo-code.cpp | 2 | ||||
-rw-r--r-- | engines/director/lingo/lingo-codegen.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
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; |