AP_Fileystem: fixed gcc9 warning

This commit is contained in:
Andrew Tridgell 2020-09-21 09:46:15 +10:00
parent dc0084a2b2
commit fabbbea0b4

View File

@ -751,7 +751,7 @@ struct dirent *AP_Filesystem_FATFS::readdir(void *dirp_void)
return nullptr;
}
len = strlen(fno.fname);
strncpy(d->de.d_name,fno.fname,len);
strncpy_noterm(d->de.d_name,fno.fname,len);
d->de.d_name[len] = 0;
if (fno.fattrib & AM_DIR) {
d->de.d_type = DT_DIR;