Skip to content

Commit

Permalink
GCS_MAVLink/GCS_FTP: fix warning with GCC 11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
shellixyz committed Jul 14, 2022
1 parent ef9e1fc commit 8850fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/GCS_MAVLink/GCS_FTP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ int GCS_MAVLINK::gen_dir_entry(char *dest, size_t space, const char *path, const
}

if (is_file) {
const size_t full_path_len = strlen(path) + strnlen(entry->d_name, 256); // FIXME: Really should do better then just hardcoding 256
const size_t full_path_len = strlen(path) + strnlen(entry->d_name, 255); // FIXME: Really should do better then just hardcoding 256
char full_path[full_path_len + 2];
hal.util->snprintf(full_path, sizeof(full_path), "%s/%s", path, entry->d_name);
struct stat st;
Expand Down

0 comments on commit 8850fb9

Please sign in to comment.