Use memmem in place of strnstr

weechat-hashes
Curtis McEnroe 2019-01-25 02:27:38 -05:00
parent a7f3ff3172
commit 5fcd801783
No known key found for this signature in database
GPG Key ID: CEA2F97ADCFCD77C
1 changed files with 1 additions and 1 deletions

2
irc.c
View File

@ -140,7 +140,7 @@ retry:
char *crlf;
char *line = buf;
while (NULL != (crlf = strnstr(line, "\r\n", &buf[len] - line))) {
while (NULL != (crlf = memmem(line, &buf[len] - line, "\r\n", 2))) {
crlf[0] = '\0';
if (self.raw) {
uiFmt(TagRaw, UICold, "\3%d>>>\3 %s", IRCGray, line);