From 143a5e61fc8e704f3df776d089217f031bc47779 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 5 Apr 2014 22:34:05 +0200 Subject: Fixed Endiannes conversion routines for floats and doubles. This bug has been introduced in 8825d30aabbee8cb2e452dc5a17deb6f9b6892a7. This change fixes #854. --- src/Endianness.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Endianness.h') diff --git a/src/Endianness.h b/src/Endianness.h index 6a2593077..78f9a5d99 100644 --- a/src/Endianness.h +++ b/src/Endianness.h @@ -49,7 +49,7 @@ inline double NetworkToHostDouble8(const void * a_Value) inline Int64 NetworkToHostLong8(const void * a_Value) { UInt64 buf; - memcpy(&buf, &a_Value, 8); + memcpy(&buf, a_Value, 8); buf = ntohll(buf); return *reinterpret_cast(&buf); } @@ -62,7 +62,7 @@ inline float NetworkToHostFloat4(const void * a_Value) { UInt32 buf; float x; - memcpy(&buf, &a_Value, 4); + memcpy(&buf, a_Value, 4); buf = ntohl(buf); memcpy(&x, &buf, sizeof(float)); return x; -- cgit v1.2.3