Ignore empty extra lines in train.txt

This commit is contained in:
AlexeyAB
2018-05-29 14:35:32 +03:00
parent 6fd90762c5
commit ec766fc3f1

View File

@ -46,10 +46,12 @@ char **get_random_paths(char **paths, int n, int m)
pthread_mutex_lock(&mutex);
//printf("n = %d \n", n);
for(i = 0; i < n; ++i){
do {
int index = random_gen() % m;
random_paths[i] = paths[index];
//if(i == 0) printf("%s\n", paths[index]);
//printf("grp: %s\n", paths[index]);
} while (strlen(random_paths[i]) == 0);
}
pthread_mutex_unlock(&mutex);
return random_paths;