Skip to content
Snippets Groups Projects
Commit 87755480 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

fast-forward to first line of work

parent 9013584e
No related branches found
No related tags found
No related merge requests found
Pipeline #6270 passed
...@@ -360,10 +360,15 @@ void* generate_stats_thread(void* threadarg) { ...@@ -360,10 +360,15 @@ void* generate_stats_thread(void* threadarg) {
string password; string password;
uint64_t nbPasswords; uint64_t nbPasswords;
while(readfile >> line) { // fast-forward to beginning of work
while(nbline < my_data->lineBegin){
readfile.ignore('\n');
readfile.get();
++nbline;
}
while(nbline < my_data->lineEnd && readfile >> line) {
++nbline; ++nbline;
if (nbline < my_data->lineBegin){ continue; }
if (nbline > my_data->lineEnd){ break; }
if (line.size() == 0){ continue; } if (line.size() == 0){ continue; }
if (my_data->withcount) { if (my_data->withcount) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment