diff options
author | Denis Kasak | 2009-06-29 22:20:30 +0000 |
---|---|---|
committer | Denis Kasak | 2009-06-29 22:20:30 +0000 |
commit | 63aa2b7aafefbd1611ac8f6cbf1f55339b5d9a74 (patch) | |
tree | c5db962513246cd6dd858a29b84cec4d16142bf3 | |
parent | 6a78781889a9803ae06f2818c2809f2625baefb8 (diff) | |
download | scummvm-rg350-63aa2b7aafefbd1611ac8f6cbf1f55339b5d9a74.tar.gz scummvm-rg350-63aa2b7aafefbd1611ac8f6cbf1f55339b5d9a74.tar.bz2 scummvm-rg350-63aa2b7aafefbd1611ac8f6cbf1f55339b5d9a74.zip |
Account for endianess properly when reading in game variables.
svn-id: r41965
-rw-r--r-- | engines/draci/game.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/draci/game.cpp b/engines/draci/game.cpp index 76dee965f1..94c7c1fc31 100644 --- a/engines/draci/game.cpp +++ b/engines/draci/game.cpp @@ -96,10 +96,14 @@ Game::Game(DraciEngine *vm) : _vm(vm) { file = initArchive[2]; unsigned int numVariables = file->_length / sizeof (int16); - + _variables = new int16[numVariables]; - memcpy(_variables, file->_data, file->_length); + Common::MemoryReadStream variableData(file->_data, file->_length); + for (i = 0; i < numVariables; ++i) { + _variables[i] = variableData.readUint16LE(); + } + // Read in item status file = initArchive[1]; |