diff options
| author | Adam <Adam@anope.org> | 2010-08-15 14:08:05 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-08-15 14:08:05 -0400 |
| commit | c2a97d9f3f2d56d889875f9b60d1e2cbc9826d15 (patch) | |
| tree | 5530abf6bdb54f8c32b1f681f6367536a412e262 /src/operserv.cpp | |
| parent | a950ed8cabfeca55c909f02412b1788bd386dcff (diff) | |
Cleanup of various different crashes/inconsistancies
Diffstat (limited to 'src/operserv.cpp')
| -rw-r--r-- | src/operserv.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/operserv.cpp b/src/operserv.cpp index fd345cb8c..0582e91ee 100644 --- a/src/operserv.cpp +++ b/src/operserv.cpp @@ -407,16 +407,15 @@ XLine *XLineManager::Check(User *u) { const time_t now = time(NULL); - for (std::vector<XLine *>::iterator it = this->XLines.begin(), it_end = this->XLines.end(); it != it_end; ++it) + for (unsigned i = this->XLines.size(); i > 0; --i) { - XLine *x = *it; + XLine *x = this->XLines[i - 1]; if (x->Expires && x->Expires < now) { OnExpire(x); delete x; - it = XLines.erase(it); - --it; + this->XLines.erase(XLines.begin() + i - 1); continue; } |
