Use memmem in place of strnstr
parent
a7f3ff3172
commit
5fcd801783
2
irc.c
2
irc.c
|
@ -140,7 +140,7 @@ retry:
|
||||||
|
|
||||||
char *crlf;
|
char *crlf;
|
||||||
char *line = buf;
|
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';
|
crlf[0] = '\0';
|
||||||
if (self.raw) {
|
if (self.raw) {
|
||||||
uiFmt(TagRaw, UICold, "\3%d>>>\3 %s", IRCGray, line);
|
uiFmt(TagRaw, UICold, "\3%d>>>\3 %s", IRCGray, line);
|
||||||
|
|
Loading…
Reference in New Issue