You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the C standard, strncpy(dst, src, count) always writes exactly count bytes to dst, padding with zeroes after src has been copied.
The current implementation of strncpy_P doesn't do that, it just stops after copying src and the terminating zero. Code relying on the trailing zeroes works well with strncpy, but it doesn't work with strncpy_P.
The text was updated successfully, but these errors were encountered:
Core Version: 2.3.0
According to the C standard,
strncpy(dst, src, count)
always writes exactlycount
bytes todst
, padding with zeroes aftersrc
has been copied.The current implementation of
strncpy_P
doesn't do that, it just stops after copyingsrc
and the terminating zero. Code relying on the trailing zeroes works well withstrncpy
, but it doesn't work withstrncpy_P
.The text was updated successfully, but these errors were encountered: