menu clearing fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3415 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-11-06 05:35:36 +00:00
parent b09d898fbc
commit d5a317aefa
+2 -1
View File
@@ -158,10 +158,11 @@ struct mitemmanual : mitem
if(action && action[0])
{
int oldstack = menustack.length();
gmenu *oldmenu = oldstack > 0 ? menustack.last() : curmenu;
push("arg1", text);
int result = execute(action);
pop("arg1");
if(result >= 0 && menustack.length() <= oldstack)
if(result >= 0 && menustack.length() == oldstack && (oldstack > 0 ? menustack.last() : curmenu) == oldmenu)
{
menuset(NULL, false);
menustack.setsize(0);