diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-11 12:41:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-11 12:41:03 +0000 |
commit | 7336f449ebaa068703e1caa7d8b1b7a9993b651f (patch) | |
tree | b1673bd79f45e2c8fd0a0971f450e6bc42028c10 /include/modules.h | |
parent | ba79ba9fc1c95868ea1e9d4d700c014e21cc2d0f (diff) |
Fix crashes from badly written safeiters
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8563 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r-- | include/modules.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/modules.h b/include/modules.h index 51f1630d4..5190563ef 100644 --- a/include/modules.h +++ b/include/modules.h @@ -125,10 +125,10 @@ typedef std::map<std::string, std::pair<int, modulelist> > interfacelist; */ #define FOREACH_MOD(y,x) do { \ EventHandlerIter safei; \ - for (EventHandlerIter _i = ServerInstance->Modules->EventHandlers[y].begin(); _i != ServerInstance->Modules->EventHandlers[y].end(); ++_i) \ + for (EventHandlerIter _i = ServerInstance->Modules->EventHandlers[y].begin(); _i != ServerInstance->Modules->EventHandlers[y].end(); ) \ { \ safei = _i; \ - safei++; \ + ++safei; \ try \ { \ (*_i)->x ; \ @@ -149,10 +149,10 @@ typedef std::map<std::string, std::pair<int, modulelist> > interfacelist; */ #define FOREACH_MOD_I(z,y,x) do { \ EventHandlerIter safei; \ - for (EventHandlerIter _i = z->Modules->EventHandlers[y].begin(); _i != z->Modules->EventHandlers[y].end(); ++_i) \ + for (EventHandlerIter _i = z->Modules->EventHandlers[y].begin(); _i != z->Modules->EventHandlers[y].end(); ) \ { \ safei = _i; \ - safei++; \ + ++safei; \ try \ { \ (*_i)->x ; \ @@ -174,10 +174,10 @@ typedef std::map<std::string, std::pair<int, modulelist> > interfacelist; do { \ EventHandlerIter safei; \ MOD_RESULT = 0; \ - for (EventHandlerIter _i = ServerInstance->Modules->EventHandlers[y].begin(); _i != ServerInstance->Modules->EventHandlers[y].end(); ++_i) \ + for (EventHandlerIter _i = ServerInstance->Modules->EventHandlers[y].begin(); _i != ServerInstance->Modules->EventHandlers[y].end(); ) \ { \ safei = _i; \ - safei++; \ + ++safei; \ try \ { \ int res = (*_i)->x ; \ @@ -204,10 +204,10 @@ do { \ do { \ EventHandlerIter safei; \ MOD_RESULT = 0; \ - for (EventHandlerIter _i = z->Modules->EventHandlers[y].begin(); _i != z->Modules->EventHandlers[y].end(); ++_i) \ + for (EventHandlerIter _i = z->Modules->EventHandlers[y].begin(); _i != z->Modules->EventHandlers[y].end(); ) \ { \ safei = _i; \ - safei++; \ + ++safei; \ try \ { \ int res = (*_i)->x ; \ |