From ec8689cbbadd716fdb5b8ff57f873ac98c725158 Mon Sep 17 00:00:00 2001 From: Aram Date: Thu, 12 May 2016 00:05:46 +0200 Subject: [PATCH] Moved fix for bug in the end condition for threads to the proper proper place --- libnfc_crypto1_crack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libnfc_crypto1_crack.c b/libnfc_crypto1_crack.c index 7225182..30a842b 100644 --- a/libnfc_crypto1_crack.c +++ b/libnfc_crypto1_crack.c @@ -668,6 +668,8 @@ int main (int argc, const char * argv[]) { fprintf(stderr, "No solution found :(\n"); return 1; } + + thread_count = get_nprocs_conf(); // append some zeroes to the end of the space to make sure threads don't go off into the wild size_t j = 0; for(j = 0; space[j]; j+=5){ @@ -676,8 +678,6 @@ int main (int argc, const char * argv[]) { for(; j < fill; j++) { space[j] = 0; } - - thread_count = get_nprocs_conf(); pthread_t threads[thread_count]; size_t i;