WINTERMUTE: Silence/fix some warnigns when compiling Symbian port.

See bug #6625 "WINTERMUTE: Symbian Compilation Warnings".
This commit is contained in:
Johannes Schickel 2014-06-08 18:52:05 +02:00
parent 257f9fd2ae
commit b6b6d39992
2 changed files with 3 additions and 2 deletions

View File

@ -488,7 +488,8 @@ double ScScript::getFloat() {
SWAP(buffer[3], buffer[4]);
#endif
double ret = *(double *)(buffer);
double ret;
memcpy(&ret, buffer, sizeof(double));
_iP += 8; // Hardcode the double-size used originally.
return ret;
}

View File

@ -443,7 +443,7 @@ bool SXFile::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
return STATUS_OK;
}
float val;
(*(uint32 *)&val) = _readFile->readUint32LE();
WRITE_UINT32(&val, _readFile->readUint32LE());
if (!_readFile->err()) {
stack->pushFloat(val);
} else {