aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/coroutines.h3
-rw-r--r--common/dcl.cpp6
-rw-r--r--common/scummsys.h4
3 files changed, 10 insertions, 3 deletions
diff --git a/common/coroutines.h b/common/coroutines.h
index 834c67f6e4..30b9bb6a99 100644
--- a/common/coroutines.h
+++ b/common/coroutines.h
@@ -128,7 +128,7 @@ public:
*/
#define CORO_BEGIN_CONTEXT \
struct CoroContextTag : Common::CoroBaseContext { \
- CoroContextTag() : CoroBaseContext(SCUMMVM_CURRENT_FUNCTION) {} \
+ CoroContextTag() : CoroBaseContext(SCUMMVM_CURRENT_FUNCTION) { DUMMY = 0; } \
int DUMMY
/**
@@ -146,6 +146,7 @@ public:
#define CORO_BEGIN_CODE(x) \
if (&coroParam == &Common::nullContext) assert(!Common::nullContext); \
if (!x) { coroParam = x = new CoroContextTag(); } \
+ x->DUMMY = 0; \
Common::CoroContextHolder tmpHolder(coroParam); \
switch (coroParam->_line) { case 0:;
diff --git a/common/dcl.cpp b/common/dcl.cpp
index 1879be992d..87ec0ad915 100644
--- a/common/dcl.cpp
+++ b/common/dcl.cpp
@@ -371,12 +371,14 @@ bool DecompressorDCL::unpack(ReadStream *src, byte *dest, uint32 nPacked, uint32
debug(8, "\nCOPY(%d from %d)\n", val_length, val_distance);
if (val_length + _dwWrote > _szUnpacked) {
- warning("DCL-INFLATE Error: Write out of bounds while copying %d bytes", val_length);
+ warning("DCL-INFLATE Error: Write out of bounds while copying %d bytes (declared unpacked size is %d bytes, current is %d + %d bytes)",
+ val_length, _szUnpacked, _dwWrote, val_length);
return false;
}
if (_dwWrote < val_distance) {
- warning("DCL-INFLATE Error: Attempt to copy from before beginning of input stream");
+ warning("DCL-INFLATE Error: Attempt to copy from before beginning of input stream (declared unpacked size is %d bytes, current is %d bytes)",
+ _szUnpacked, _dwWrote);
return false;
}
diff --git a/common/scummsys.h b/common/scummsys.h
index 3e9d5ef063..b15a76e5b9 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -23,6 +23,10 @@
#ifndef COMMON_SCUMMSYS_H
#define COMMON_SCUMMSYS_H
+#ifndef __has_feature // Optional of course.
+ #define __has_feature(x) 0 // Compatibility with non-clang compilers.
+#endif
+
// This is a convenience macro to test whether the compiler used is a GCC
// version, which is at least major.minor.
#define GCC_ATLEAST(major, minor) (defined(__GNUC__) && (__GNUC__ > (major) || (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor))))