diff --git a/src/modules/systemlib/param/param.c b/src/modules/systemlib/param/param.c index cb0d7c1241..28340107d3 100644 --- a/src/modules/systemlib/param/param.c +++ b/src/modules/systemlib/param/param.c @@ -947,6 +947,10 @@ param_save_default(void) while (res != OK && attempts > 0) { res = param_export(fd, false); attempts--; + + if (res != OK) { + lseek(fd, 0, SEEK_SET); // jump back to the beginning of the file + } } if (res != OK) {