From 5291935b70c21ddbbc7bbd592f87921cb1f8a2ff Mon Sep 17 00:00:00 2001
From: IlyaOvodov <b@ovdv.ru>
Date: Mon, 04 Jun 2018 15:56:23 +0000
Subject: [PATCH] Net color depth is exposed from Detector class

---
 src/data.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/data.c b/src/data.c
index e8bfa92..a15bc1d 100644
--- a/src/data.c
+++ b/src/data.c
@@ -45,11 +45,13 @@
     int i;
     pthread_mutex_lock(&mutex);
 	//printf("n = %d \n", n);
-    for(i = 0; i < n; ++i){		
-        int index = random_gen() % m;
-        random_paths[i] = paths[index];
-        //if(i == 0) printf("%s\n", paths[index]);
-		//printf("grp: %s\n", paths[index]);
+    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;

--
Gitblit v1.10.0