Correct a last-minute thinko. Instead of copying the nul with the string,

nul-terminate the dp->d_name directly and only copy the string.
This commit is contained in:
njl 2005-03-11 23:35:23 +00:00
parent a08e532eaa
commit f5d07b2dc9

View File

@ -1249,8 +1249,8 @@ mbnambuf_flush(struct dirent *dp)
mbnambuf_init();
return (NULL);
}
nambuf_ptr[nambuf_len] = '\0';
memcpy(dp->d_name, nambuf_ptr, nambuf_len);
dp->d_name[nambuf_len] = '\0';
dp->d_namlen = nambuf_len;
mbnambuf_init();