diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hashcomp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 3db888af5..a2b1eab0b 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -154,7 +154,7 @@ const char* irc::irc_char_traits::find(const char* s1, int n, char c) { while(n-- > 0 && national_case_insensitive_map[(unsigned char)*s1] != national_case_insensitive_map[(unsigned char)c]) s1++; - return s1; + return (n >= 0) ? s1 : NULL; } irc::tokenstream::tokenstream(const std::string &source) : tokens(source), last_pushed(false) |