diff options
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp index 7513fa273..8c3ad4969 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -276,7 +276,8 @@ bool userrec::AddBuffer(std::string a) bool userrec::BufferIsReady() { - for (unsigned int i = 0; i < recvq.length(); i++) + unsigned int t = recvq.length(); + for (unsigned int i = 0; i < t; i++) if (recvq[i] == '\n') return true; return false; @@ -293,7 +294,7 @@ std::string userrec::GetBuffer() return ""; char* line = (char*)recvq.c_str(); std::string ret = ""; - while ((*line != '\n') && (strlen(line))) + while ((*line != '\n') && (*line)) { ret = ret + *line; line++; |