diff options
author | Filippos Karapetis | 2008-04-09 11:25:23 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-04-09 11:25:23 +0000 |
commit | 08f7059cf22f912a3d826ec79f153f3eba794daa (patch) | |
tree | e5423a22b1d8cba33bb1202c1c8c5ccb228d15cc /engines | |
parent | 9f6012c29474569a88fca7a47743cd570b6f5e02 (diff) | |
download | scummvm-rg350-08f7059cf22f912a3d826ec79f153f3eba794daa.tar.gz scummvm-rg350-08f7059cf22f912a3d826ec79f153f3eba794daa.tar.bz2 scummvm-rg350-08f7059cf22f912a3d826ec79f153f3eba794daa.zip |
Fixed an off-by one error in the AGI set_menu opcode. Fixes bug #1935896 - "AGI: Fan(Beyond Titanic 2) - Assertion"
svn-id: r31457
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/op_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index 702c6352e1..01ec081315 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -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]); } |