From: Greg Davill Date: Sat, 4 Dec 2021 06:05:06 +0000 (+1030) Subject: Fix verify size X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=777e5aaf90c7f4464922317654349fd87939f132;p=ecpprog.git Fix verify size --- diff --git a/ecpprog/ecpprog.c b/ecpprog/ecpprog.c index 20c3d80..316000d 100644 --- a/ecpprog/ecpprog.c +++ b/ecpprog/ecpprog.c @@ -1125,7 +1125,7 @@ int main(int argc, char **argv) } else if (!erase_mode && !disable_verify) { flash_start_read(rw_offset); - for (int addr = 0; addr < read_size; addr += 4096) { + for (int addr = 0; addr < file_size; addr += 4096) { uint8_t buffer_flash[4096], buffer_file[4096]; int rc = fread(buffer_file, 1, 4096, f);