Added a sanity check for original game script bugs in Agent06. Fixes bugs #1935842 - "AGI: Fan(Agent06) - Graphic errors" and #1935838 - "AGI: Fan(Agent06) - Crash on Quit"

svn-id: r31449
This commit is contained in:
Filippos Karapetis 2008-04-08 08:54:05 +00:00
parent 0aff78a05d
commit 9a0825cc06

View File

@ -1424,6 +1424,10 @@ cmd(clear_lines) {
/* Residence 44 calls clear.lines(24,0,0), see Sarien bug #558423 */
l = p1 ? p1 : p0;
// Agent06 incorrectly calls clear.lines(1,150,0), see ScummVM bugs
// #1935838 and #1935842
l = (l <= 24) ? l : 24;
g_agi->clearLines(p0, l, p2);
g_agi->flushLines(p0, l);
}