21 lines
673 B
Diff
21 lines
673 B
Diff
commit aae8b485076dfa0fb1bd6683b36437eec0133376
|
|
Author: q66 <daniel@octaforge.org>
|
|
Date: Sat Jan 4 18:04:43 2020 +0100
|
|
|
|
Fix MSB_UINT on big endian
|
|
|
|
diff --git src/GMCover.cpp src/GMCover.cpp
|
|
index bbebd6a..2796360 100644
|
|
--- src/GMCover.cpp
|
|
+++ src/GMCover.cpp
|
|
@@ -26,8 +26,8 @@
|
|
#define MSB_UINT(x) ((x)[3]) | ((x)[2]<<8) | ((x)[1]<<16) | ((x)[0]<<24)
|
|
#define MSB_SHORT(x) ((x)[0]<<8) | ((x)[1])
|
|
#else
|
|
-#define MSB_UINT(data) (data[0]) | (data[1]<<8) | (data[2]<<16) | (data[3]<<24)
|
|
-#define MSB_SHORT(data) (data[1]<<8) | (data[0])
|
|
+#define MSB_UINT(x) ((x)[0]) | ((x)[1]<<8) | ((x)[2]<<16) | ((x)[3]<<24)
|
|
+#define MSB_SHORT(x) ((x)[1]<<8) | ((x)[0])
|
|
#endif
|
|
|
|
|