Skip to content

Commit a4fdb6c

Browse files
test with memcpy
Checking if memcpy use less than strlcpy
1 parent 675ef46 commit a4fdb6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/WString.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ unsigned char String::concat(const char *cstr, unsigned int length)
266266
if (!cstr) return 0;
267267
if (length == 0) return 1;
268268
if (!reserve(newlen)) return 0;
269-
strlcpy(buffer + len, cstr, length);
269+
memcpy(buffer + len, cstr, length);
270270
len = newlen;
271271
return 1;
272272
}

0 commit comments

Comments
 (0)