aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/endian.h6
-rw-r--r--common/quicktime.h1
-rw-r--r--common/winexe_pe.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/common/endian.h b/common/endian.h
index 394437ec67..759513efef 100644
--- a/common/endian.h
+++ b/common/endian.h
@@ -146,6 +146,12 @@
*/
#define MKTAG(a0,a1,a2,a3) ((uint32)((a3) | ((a2) << 8) | ((a1) << 16) | ((a0) << 24)))
+/**
+ * A wrapper macro used around two character constants, like 'wb', to
+ * ensure portability. Typical usage: MKTAG16('w','b').
+ */
+#define MKTAG16(a0,a1) ((uint16)((a1) | ((a0) << 8)))
+
// Functions for reading/writing native integers.
// They also transparently handle the need for alignment.
diff --git a/common/quicktime.h b/common/quicktime.h
index 974502d075..08ca35ad51 100644
--- a/common/quicktime.h
+++ b/common/quicktime.h
@@ -35,6 +35,7 @@
#include "common/scummsys.h"
#include "common/stream.h"
#include "common/rational.h"
+#include "common/types.h"
namespace Common {
class MacResManager;
diff --git a/common/winexe_pe.cpp b/common/winexe_pe.cpp
index 6c0f9c9962..b3c45ffe73 100644
--- a/common/winexe_pe.cpp
+++ b/common/winexe_pe.cpp
@@ -64,7 +64,7 @@ bool PEResources::loadFromEXE(SeekableReadStream *stream) {
if (!stream)
return false;
- if (stream->readUint16BE() != 'MZ')
+ if (stream->readUint16BE() != MKTAG16('M', 'Z'))
return false;
stream->skip(58);