From 85bfbeccc363595e00557572e256467991fc924d Mon Sep 17 00:00:00 2001 From: TuxSH Date: Thu, 17 May 2018 02:07:11 +0200 Subject: [PATCH] Fix latest commit --- fusee/fusee-secondary/src/package1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fusee/fusee-secondary/src/package1.c b/fusee/fusee-secondary/src/package1.c index 6c7c60483..04291bd2f 100644 --- a/fusee/fusee-secondary/src/package1.c +++ b/fusee/fusee-secondary/src/package1.c @@ -34,13 +34,13 @@ int package1_read_and_parse_boot0(void **package1loader, size_t *package1loader_ free(bct); return -1; } - if (bct->bootloader_used < 1) { + if (bct->bootloader_used < 1 || pk1l_info->version < 1) { free(bct); errno = EILSEQ; return -1; } - *revision = pk1l_info->version; + *revision = pk1l_info->version - 1; *package1loader_size = pk1l_info->length; pk1l_offset = 0x4000 * pk1l_info->start_blk + 0x200 * pk1l_info->start_page;