diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-20 05:00:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-20 05:00:03 +0000 |
commit | 0985cef77b7f0b653435dcf8405d8c532af99639 (patch) | |
tree | 5aa1dc2bfe9dc038a0d9405f4547a7d07f128dcc /src/users.cpp | |
parent | 9f5c15c806db1e9aac49579204ed2a2aa69f7c3c (diff) |
Prevent vc8 from thinking we're dereferencing an end iterator
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7059 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index 2cec79a95..b53989292 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -650,8 +650,12 @@ std::string userrec::GetBuffer() * Usually there are only one or two of these, * so its is computationally cheap to do. */ - while ((*recvq.begin() == '\r') || (*recvq.begin() == '\n')) - recvq.erase(recvq.begin()); + std::string::iterator t = recvq.begin(); + while (t != recvq.end() && (*t == '\r' || *t == '\n')) + { + recvq.erase(t); + t = recvq.begin(); + } for (std::string::iterator x = recvq.begin(); x != recvq.end(); x++) { |