Browse Source

Use memmem in place of strnstr

June 3 weeks ago
parent
commit
5fcd801783
Signed by: Curtis McEnroe <june@causal.agency> GPG Key ID: CEA2F97ADCFCD77C
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      irc.c

+ 1
- 1
irc.c View File

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

Loading…
Cancel
Save