Fix incorrect comparison in strcpy_no_crlf
parent
4c117f3e4d
commit
6f0d71a07b
|
@ -18,7 +18,7 @@ static char *strcpy_no_crlf(char *dest, const char *src) {
|
|||
char *last_dest_cursor = NULL;
|
||||
const char *last_src_cursor = NULL;
|
||||
for (dest_cursor = dest, src_cursor = src; *src_cursor != '\0'; src_cursor++) {
|
||||
if (last_src_cursor != NULL && *last_src_cursor == '\r' && *last_src_cursor == '\n') {
|
||||
if (last_src_cursor != NULL && *last_src_cursor == '\r' && *src_cursor == '\n') {
|
||||
// Replace the \r with a null term.
|
||||
*last_dest_cursor = '\0';
|
||||
return dest;
|
||||
|
|
Loading…
Reference in New Issue