aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/xeen/combat.cpp3
-rw-r--r--engines/xeen/map.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index 8afe48da15..e7502d6437 100644
--- a/engines/xeen/combat.cpp
+++ b/engines/xeen/combat.cpp
@@ -467,7 +467,8 @@ void Combat::moveMonsters() {
for (uint idx = 0; idx < map._mobData._monsters.size(); ++idx) {
MazeMonster &monster = map._mobData._monsters[idx];
- if (monster._position.y < 32) {
+ if ((uint)monster._position.y < 32) {
+ assert((uint)monster._position.x < 32);
_monsterMap[monster._position.y][monster._position.x]++;
}
}
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp
index aab806ff98..f3c00dd96d 100644
--- a/engines/xeen/map.cpp
+++ b/engines/xeen/map.cpp
@@ -112,6 +112,7 @@ MonsterStruct::MonsterStruct(Common::String name, int experience, int hp, int ar
void MonsterStruct::synchronize(Common::SeekableReadStream &s) {
char name[16];
+ Common::fill(name, name + 16, '\0');
s.read(name, 16);
name[15] = '\0';
_name = Common::String(name);
@@ -147,6 +148,7 @@ void MonsterStruct::synchronize(Common::SeekableReadStream &s) {
_fx = s.readByte();
char attackVoc[10];
+ Common::fill(attackVoc, attackVoc + 10, '\0');
s.read(attackVoc, 9);
attackVoc[9] = '\0';
_attackVoc = Common::String(attackVoc);