1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-06 05:52:32 -08:00

Avoid a compilation warning in w32.c

* src/w32.c (logon_network_drive): Avoid compilation warning
about strncpy arguments.
This commit is contained in:
Eli Zaretskii 2019-08-23 16:00:25 +03:00
parent c4dd5a73ce
commit 4b87169d11

View file

@ -3918,7 +3918,7 @@ logon_network_drive (const char *path)
return;
n_slashes = 2;
strncpy (share, path, MAX_UTF8_PATH);
strncpy (share, path, MAX_UTF8_PATH - 1);
/* Truncate to just server and share name. */
for (p = share + 2; *p && p < share + MAX_UTF8_PATH; p++)
{