menu closing fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3455 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-11-08 20:15:26 +00:00
parent e3923f17b3
commit 0034503276
+2 -3
View File
@@ -157,12 +157,11 @@ struct mitemmanual : mitem
{
if(action && action[0])
{
int oldstack = menustack.length();
gmenu *oldmenu = oldstack > 0 ? menustack.last() : curmenu;
gmenu *oldmenu = curmenu;
push("arg1", text);
int result = execute(action);
pop("arg1");
if(result >= 0 && menustack.length() == oldstack && (oldstack > 0 ? menustack.last() : curmenu) == oldmenu)
if(result >= 0 && oldmenu == curmenu)
{
menuset(NULL, false);
menustack.setsize(0);