mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
31 lines
983 B
Diff
31 lines
983 B
Diff
--- a/par2creatorsourcefile.cpp
|
|
+++ b/par2creatorsourcefile.cpp
|
|
@@ -213,21 +213,22 @@ bool Par2CreatorSourceFile::Open(CommandLine::NoiseLevel noiselevel, const Comma
|
|
}
|
|
}
|
|
|
|
+ // Define MPDL to skip reporting; speeds up things considerably
|
|
+#ifndef MPDL
|
|
if (noiselevel > CommandLine::nlQuiet)
|
|
{
|
|
// Display progress
|
|
u32 oldfraction = (u32)(1000 * offset / filesize);
|
|
- offset += want;
|
|
- u32 newfraction = (u32)(1000 * offset / filesize);
|
|
+ // The original source had here: offset += want;
|
|
+ // That's definitely an error, because offset must always be incremented!
|
|
+ u32 newfraction = (u32)(1000 * (offset + want) / filesize);
|
|
if (oldfraction != newfraction)
|
|
{
|
|
cout << newfraction/10 << '.' << newfraction%10 << "%\r" << flush;
|
|
}
|
|
}
|
|
- else
|
|
- {
|
|
- offset += want;
|
|
- }
|
|
+#endif
|
|
+ offset += want;
|
|
}
|
|
|
|
// Did we finish the last block
|