diff --git a/src/core/flash.c b/src/core/flash.c index 777ab7092..193de5920 100644 --- a/src/core/flash.c +++ b/src/core/flash.c @@ -114,7 +114,7 @@ void flash_save() { flash_write_magic(buffer, FMC_MAGIC | VTX_STORAGE_OFFSET); cbor_value_t enc; - cbor_encoder_init(&enc, buffer + FMC_MAGIC_SIZE, size + FMC_MAGIC_SIZE); + cbor_encoder_init(&enc, buffer + FMC_MAGIC_SIZE, size - FMC_MAGIC_SIZE); cbor_result_t res = cbor_encode_vtx_settings_t(&enc, &vtx_settings); if (res < CBOR_OK) {