diff --git a/libraries/AP_Filesystem/AP_Filesystem_Param.cpp b/libraries/AP_Filesystem/AP_Filesystem_Param.cpp index 3ab8d687f3..5d3203227c 100644 --- a/libraries/AP_Filesystem/AP_Filesystem_Param.cpp +++ b/libraries/AP_Filesystem/AP_Filesystem_Param.cpp @@ -56,6 +56,7 @@ int AP_Filesystem_Param::open(const char *fname, int flags) r.start = 0; r.count = 0; r.read_size = 0; + r.file_size = 0; r.writebuf = nullptr; if (!read_only) { // setup for upload