diff options
author | Filippos Karapetis | 2009-11-20 11:08:19 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-11-20 11:08:19 +0000 |
commit | d1616ea74e1997756c757d33bf4bdf3a4ae7fc5f (patch) | |
tree | b6de7772fffb5cb0009df5d3c338033c37d821ff | |
parent | 893a8bb808822b78573af80ce29b9e794331b482 (diff) | |
download | scummvm-rg350-d1616ea74e1997756c757d33bf4bdf3a4ae7fc5f.tar.gz scummvm-rg350-d1616ea74e1997756c757d33bf4bdf3a4ae7fc5f.tar.bz2 scummvm-rg350-d1616ea74e1997756c757d33bf4bdf3a4ae7fc5f.zip |
Added a sanity check to prevent a crash in LB1 and KQ4 (needs proper fixing)
svn-id: r46003
-rw-r--r-- | engines/sci/gui/gui_menu.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sci/gui/gui_menu.cpp b/engines/sci/gui/gui_menu.cpp index 2406e0ef19..55688ab473 100644 --- a/engines/sci/gui/gui_menu.cpp +++ b/engines/sci/gui/gui_menu.cpp @@ -191,7 +191,8 @@ void SciGuiMenu::add(Common::String title, Common::String content, reg_t content if (rightAlignedPos) { rightAlignedPos++; tempPos = endPos; - if (tagPos) + //if (tagPos) + if (tagPos && tagPos >= rightAlignedPos) // FIXME: sanity check for LB1 and KQ4 tempPos = tagPos; itemEntry->textRightAligned = Common::String(content.c_str() + rightAlignedPos, tempPos - rightAlignedPos); } |