Fixed an off-by one error in the AGI set_menu opcode. Fixes bug #1935896 - "AGI: Fan(Beyond Titanic 2) - Assertion"

svn-id: r31457
This commit is contained in:
Filippos Karapetis 2008-04-09 11:25:23 +00:00
parent 9f6012c294
commit 08f7059cf2

View File

@ -1104,7 +1104,7 @@ cmd(pause) {
cmd(set_menu) {
debugC(4, kDebugLevelScripts, "text %02x of %02x", p0, curLogic->numTexts);
if (curLogic->texts != NULL && p0 < curLogic->numTexts)
if (curLogic->texts != NULL && p0 <= curLogic->numTexts)
g_agi->_menu->add(curLogic->texts[p0 - 1]);
}