forked from bip/bip
1
0
Fork 0

Fix gcc-8 warning.

Change weird use of strncpy where we know we will truncate and use an
extra byte copy instead.
This commit is contained in:
Arnaud Cornet 2018-12-09 19:40:36 -05:00
parent d2dcb0adb1
commit 87192685f5
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ int check_dir_r(char *dirname)
int slash_ok = 1;
while (*tmp == '/') {
if (slash_ok) {
strncpy(dir + count, "/", 1);
strncpy(dir + count, "/", 2);
count++;
slash_ok = 0;
}