]> sjero.net Git - wget/blobdiff - src/retr.c
[svn] Applied Jonas Jensen's patch to correctly calculate the number of bytes
[wget] / src / retr.c
index 0e4535e8bfdad9a14da72ffb0f5ea9754c45e882..b0297378e3932e9cb1a563e25cc95b812a31f902 100644 (file)
@@ -198,7 +198,8 @@ show_progress (long res, long expected, enum spflags flags)
          print_percentage (nrow * line_bytes + ndot * opt.dot_bytes + offs,
                            expected);
          logprintf (LOG_VERBOSE, " @%s",
-                    rate (ndot * opt.dot_bytes + offs - initial_skip,
+                    rate (ndot * opt.dot_bytes
+                          + offs - (initial_skip % line_bytes),
                           time_offset, 1));
        }
       logputs (LOG_VERBOSE, "\n\n");
@@ -255,7 +256,8 @@ show_progress (long res, long expected, enum spflags flags)
            {
              print_percentage (nrow * line_bytes, expected);
              logprintf (LOG_VERBOSE, " @%s",
-                        rate (line_bytes - initial_skip, time_offset, 1));
+                        rate (line_bytes - (initial_skip % line_bytes),
+                              time_offset, 1));
            }
          initial_skip = 0;
          logprintf (LOG_VERBOSE, "\n%5ldK", nrow * line_bytes / 1024);