aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/dreamweb/runtime.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/dreamweb/runtime.h b/engines/dreamweb/runtime.h
index 4a928ea5e2..af484fe19c 100644
--- a/engines/dreamweb/runtime.h
+++ b/engines/dreamweb/runtime.h
@@ -245,13 +245,13 @@ public:
}
inline void _add(uint8 &dst, uint8 src) {
- flags._c = dst + src < dst;
+ flags._c = (unsigned(dst) + src) >= 0x100;
dst += src;
flags.update(dst);
}
inline void _add(uint16 &dst, uint16 src) {
- flags._c = dst + src < dst;
+ flags._c = (unsigned(dst) + src) >= 0x10000;
dst += src;
flags.update(dst);
}