mirror of https://github.com/MidnightCommander/mc
* util.c (get_current_wd): We know there is just one '\0' byte
in p, at p[len - 1].
This commit is contained in:
parent
2253379eb8
commit
7c9f703060
|
@ -868,7 +868,7 @@ char *get_current_wd (char *buffer, int size)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
strncpy (buffer, p, len);
|
||||
memcpy (buffer, p, len);
|
||||
g_free (p);
|
||||
|
||||
return buffer;
|
||||
|
|
Loading…
Reference in New Issue