Fixed a % printing bug.
[finddup.git] / finddup.c
index c0a51a1..7dc2aba 100644 (file)
--- a/finddup.c
+++ b/finddup.c
@@ -457,10 +457,10 @@ void print_progress(struct progress_state *state) {
         }
 
         /* We need four % because of the fprintf that follows */
-        sprintf(s, " [%3d%%%%]\r",
+        sprintf(s, " [%3d%%]\r",
                 (100 * state->value) / normalizer);
 
-        fprintf(stderr, buffer);
+        fprintf(stderr, "%s", buffer);
       }
     }
   }