diff options
-rw-r--r-- | engines/mads/font.cpp | 4 | ||||
-rw-r--r-- | engines/mads/palette.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/engines/mads/font.cpp b/engines/mads/font.cpp index 9da46c30b1..e97cc95fdf 100644 --- a/engines/mads/font.cpp +++ b/engines/mads/font.cpp @@ -112,14 +112,14 @@ int Font::write(MSurface *surface, const Common::String &msg, const Common::Poin const char *text = msg.c_str(); while (*text) { char theChar = (*text++) & 0x7F; - int charWidth = _charWidths[theChar]; + int charWidth = _charWidths[(byte)theChar]; if (charWidth > 0) { if (xPos + charWidth >= width) return xPos; - uint8 *charData = &_charData[_charOffs[theChar]]; + uint8 *charData = &_charData[_charOffs[(byte)theChar]]; int bpp = getBpp(charWidth); if (skipY != 0) diff --git a/engines/mads/palette.h b/engines/mads/palette.h index a5d9c6ad1e..a97d5de20f 100644 --- a/engines/mads/palette.h +++ b/engines/mads/palette.h @@ -91,6 +91,11 @@ public: * Creates a new palette instance */ static Palette *init(MADSEngine *vm); + + /** + * Destructor + */ + virtual ~Palette() {} /** * Sets a new palette |