MDEV-4734 Adding ending / to a directory can fail when the directory ends with 0

+1 typo fixed
This commit is contained in:
Sergei Golubchik 2013-11-10 17:51:13 +01:00
parent 1c6394e503
commit f3c63615d8

View file

@ -98,8 +98,8 @@ static char *directory_file_name (char * dst, const char *src)
if (src[0] == 0)
src= (char*) "."; /* Use empty as current */
end=strmov(dst, src);
if (end[-1] != FN_LIBCHAR + 1)
end= strnmov(dst, src, FN_REFLEN + 1);
if (end[-1] != FN_LIBCHAR)
{
*end++= FN_LIBCHAR; /* Add last '/' */
*end='\0';