GCS_MAVLINK: fixed macos snprintf error

This commit is contained in:
Andrew Tridgell 2021-08-04 16:58:57 +10:00
parent 68a33e996d
commit 02ca6b67a2

View File

@ -585,9 +585,9 @@ int GCS_MAVLINK::gen_dir_entry(char *dest, size_t space, const char *path, const
if (AP::FS().stat(full_path, &st)) {
return -1;
}
return hal.util->snprintf(dest, space, "F%s\t%u\0", entry->d_name, (unsigned)st.st_size);
return hal.util->snprintf(dest, space, "F%s\t%u%c", entry->d_name, (unsigned)st.st_size, (char)0);
} else {
return hal.util->snprintf(dest, space, "D%s\0", entry->d_name);
return hal.util->snprintf(dest, space, "D%s%c", entry->d_name, (char)0);
}
}