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=9c05b10b12bec1e4d0b432aa0c7c39531fe58e19;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 15368e9..c9550e4 100644 --- a/ecpprog/ecpprog.c +++ b/ecpprog/ecpprog.c @@ -867,6 +867,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) {