diff options
| -rw-r--r-- | src/container/src/container.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/container/src/container.c b/src/container/src/container.c index 008ca58..5c568a9 100644 --- a/src/container/src/container.c +++ b/src/container/src/container.c @@ -159,9 +159,15 @@ static int read_all_elements(const struct container *const list, const size_t n, memset(&done, 0, sizeof done); for (size_t i = 0; i < sizeof done / sizeof *done; i++) - if (feof(f) || ferror(f) - || read_element(list, n, f, done)) + { + if (feof(f) || ferror(f)) + { + fprintf(stderr, "feof or ferror found\n"); goto end; + } + else if (read_element(list, n, f, done)) + goto end; + } for (size_t i = 0; i < sizeof done / sizeof *done; i++) { |
