aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-07-25 22:56:34 +0300
committerEugene Sandulenko2016-07-25 23:24:42 +0300
commit81446fdc539d95d1f23e32d2a8cbb87d83717ce1 (patch)
tree96e66bee2327303cd8552a5bd0b54dc2a1823009
parent7b7b1cf0d62c378f09735ccd8ebf340916f71dd3 (diff)
downloadscummvm-rg350-81446fdc539d95d1f23e32d2a8cbb87d83717ce1.tar.gz
scummvm-rg350-81446fdc539d95d1f23e32d2a8cbb87d83717ce1.tar.bz2
scummvm-rg350-81446fdc539d95d1f23e32d2a8cbb87d83717ce1.zip
FULLPIPE: Streamlined double binary numbers loading
-rw-r--r--engines/fullpipe/utils.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 0cc8bd83f4..a7dee2e59c 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -262,15 +262,11 @@ double MfcArchive::readDouble() {
// http://randomascii.wordpress.com/2012/01/11/tricks-with-the-floating-point-format/
union {
- struct {
- int32 a;
- int32 b;
- } i;
+ byte b[8];
double d;
} tmp;
- tmp.i.a = readUint32LE();
- tmp.i.b = readUint32LE();
+ read(&tmp.b, 8);
return tmp.d;
}