aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/fl2k_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fl2k_file.c b/src/fl2k_file.c
index cff5178..80ddcad 100644
--- a/src/fl2k_file.c
+++ b/src/fl2k_file.c
@@ -95,7 +95,7 @@ void fl2k_callback(fl2k_data_info_t *data_info)
fprintf(stderr, "File Error\n");
if (feof(file)) {
- if (repeat) {
+ if (repeat && (r > 0)) {
repeat_cnt++;
fprintf(stderr, "repeat %d\n", repeat_cnt);
rewind(file);