diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index d58b762ae..236cb4349 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -445,8 +445,10 @@ void ModuleSQL::OnUnloadModule(Module* mod) { SQLerror err(SQL_BAD_DBID); Dispatcher->LockQueue(); - for(unsigned int i = qq.size() - 1; i >= 0; i--) + unsigned int i = qq.size(); + while (i > 0) { + i--; if (qq[i].q->creator == mod) { if (i == 0) |