aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/text.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 82a2340ad6..efb4a640c6 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -89,8 +89,7 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
x1++;
// DF: changed the len-1 to len...
- // FIXME: m[len] doesn't make sense and may read out of bounds?
- if (x1 == len && m[len] != '\n') {
+ if (x1 == len && m[len - 1] != '\n') {
y1++;
x1 = foff = 0;
}
@@ -732,4 +731,4 @@ void AgiEngine::drawWindow(int x1, int y1, int x2, int y2) {
_gfx->drawBox(x1, y1, x2, y2, MSG_BOX_COLOR, MSG_BOX_LINE, 2);
}
-} // End of namespace Agi
+} // End of namespace Agi \ No newline at end of file