diff options
author | June McEnroe <june@causal.agency> | 2016-09-12 19:51:31 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2016-09-12 19:51:31 -0400 |
commit | 41b04677194780c96cc6dcc36a5d4ee035c80d9a (patch) | |
tree | ffb10a43acbdb8b0dfdd1a66bb8a0461461c7dba | |
parent | Rewrite xx.c (diff) | |
download | src-41b04677194780c96cc6dcc36a5d4ee035c80d9a.tar.gz src-41b04677194780c96cc6dcc36a5d4ee035c80d9a.zip |
Prevent offset from xx when reading zero
-rwxr-xr-x | .bin/xx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.bin/xx.c b/.bin/xx.c index 733a1bda..7ffadd7f 100755 --- a/.bin/xx.c +++ b/.bin/xx.c @@ -58,6 +58,7 @@ int main(int argc, char **argv) { for (;;) { offset += len; len = fread(buf, 1, sizeof(buf), file); + if (!len) break; if ((flags & FLAG_SKIP) && len == sizeof(buf)) { static bool skip = false; |