mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 12:55:24 +00:00
AGI: Resolved an old FIXME concerning OOB access
This commit is contained in:
parent
a1c4aa6d89
commit
18a0214672
@ -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
|
Loading…
x
Reference in New Issue
Block a user