--- 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