From 4eaea443e122d64e5c0a2b04f9d9e7716b74c3b0 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 22 Nov 2006 07:33:54 +0000 Subject: [PATCH] who would have thought that iterators change?! --- amxmodx/meta_api.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/amxmodx/meta_api.cpp b/amxmodx/meta_api.cpp index c216084e..0eb3bbf5 100755 --- a/amxmodx/meta_api.cpp +++ b/amxmodx/meta_api.cpp @@ -901,10 +901,10 @@ void C_ClientCommand(edict_t *pEntity) pPlayer->menu = 0; MenuMngr::iterator a = g_menucmds.begin(); - MenuMngr::iterator old = g_menucmds.SetWatchIter(a); while (a) { + g_menucmds.SetWatchIter(a); if ((*a).matchCommand(menuid, bit_key) && (*a).getPlugin()->isExecutable((*a).getFunction())) { if (pPlayer->newmenu != -1) @@ -948,8 +948,6 @@ void C_ClientCommand(edict_t *pEntity) ++a; } } - - g_menucmds.SetWatchIter(old); } }