From 02ca6b67a252b93fbbd76a876330a4e4e11625b2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 4 Aug 2021 16:58:57 +1000 Subject: [PATCH] GCS_MAVLINK: fixed macos snprintf error --- libraries/GCS_MAVLink/GCS_FTP.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS_FTP.cpp b/libraries/GCS_MAVLink/GCS_FTP.cpp index d107a7ba7d7..12567f77a99 100644 --- a/libraries/GCS_MAVLink/GCS_FTP.cpp +++ b/libraries/GCS_MAVLink/GCS_FTP.cpp @@ -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); } }