From: Ed Bordin Date: Sun, 26 Jul 2020 03:24:50 +0000 (+1000) Subject: set file_size in read mode X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0422d9494ad85580a90819711de006f2b45a1b7e;p=ecpprog.git set file_size in read mode currently it stays set to -1 and ecpprog reports e.g. "reading.. 4190208/4294967295" (the latter number being 0xFFFFFFFF) --- diff --git a/ecpprog/ecpprog.c b/ecpprog/ecpprog.c index eba15e4..8a5724e 100644 --- a/ecpprog/ecpprog.c +++ b/ecpprog/ecpprog.c @@ -908,6 +908,7 @@ int main(int argc, char **argv) perror(0); return EXIT_FAILURE; } + file_size = read_size; } else { f = (strcmp(filename, "-") == 0) ? stdin : fopen(filename, "rb"); if (f == NULL) {