aboutsummaryrefslogtreecommitdiff
path: root/engines/mortevielle/graphics.cpp
diff options
context:
space:
mode:
authorStrangerke2012-02-20 23:56:32 +0100
committerStrangerke2012-04-06 08:21:37 +0200
commitacd636dc2ca6d7828c350fe3af9af657ad890e76 (patch)
treeec9bdf1d6eece1c0f900ded00252787f135d6bc8 /engines/mortevielle/graphics.cpp
parentd0ec6e9b32249a81606594c4d77c5baf29061550 (diff)
downloadscummvm-rg350-acd636dc2ca6d7828c350fe3af9af657ad890e76.tar.gz
scummvm-rg350-acd636dc2ca6d7828c350fe3af9af657ad890e76.tar.bz2
scummvm-rg350-acd636dc2ca6d7828c350fe3af9af657ad890e76.zip
MORTEVIELLE: Some more cleanup, renaming, plus a couple of crash fixes in deline and writeg
Diffstat (limited to 'engines/mortevielle/graphics.cpp')
-rw-r--r--engines/mortevielle/graphics.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp
index 62f13dac5e..1c0a4fa0a3 100644
--- a/engines/mortevielle/graphics.cpp
+++ b/engines/mortevielle/graphics.cpp
@@ -484,7 +484,8 @@ void GfxSurface::horizontal(const byte *&pSrc, byte *&pDest, const byte *&pLooku
for (;;) {
// If position is past end point, then skip this line
if (((_thickness - 1) * DEFAULT_WIDTH) + pDest >= pDestEnd) {
- if (--_thickness == 0) break;
+ if (--_thickness == 0)
+ break;
continue;
}
@@ -1081,7 +1082,7 @@ void ScreenSurface::writeg(const Common::String &l, int c) {
}
pt.x += 1;
pt.y += 1;
- for (x = 1; x <= (int)l.size(); ++x) {
+ for (x = 1; (x <= (int)l.size()) && (l[x - 1] != 0); ++x) {
g_vm->_screenSurface.writeCharacter(Common::Point(pt.x, pt.y), ord(l[x - 1]), cecr);
pt.x += i;
}