Permalink
Browse files

Merge pull request #6 from unix-ninja/master

fix iteration of r_ctx loops
  • Loading branch information...
jsteube committed Mar 15, 2016
2 parents fe56c82 + e614360 commit cc37ab696eaa7d6385a4e4a96a0373c41b572011
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/sp.c
@@ -1025,9 +1025,18 @@ int main (int argc, char *argv[])
}

uint64_t l_ctx;
/* we want to iterate through modulo last, so store it here */
uint64_t r_ctx_final = r_ctx_max;

for (l_ctx = l_ctx_min; l_ctx < l_ctx_max; l_ctx++)
{
/* iterate through length first, and modulo last */
if(l_ctx < l_ctx_max-1)
{
r_ctx_max = r_cnt;
} else {
r_ctx_max = r_ctx_final;
}
sp_exec (l_ctx, pw_buf, root_css_buf, markov_css_buf, 0, l_len);

uint32_t out_pos = 0;
@@ -1064,7 +1073,6 @@ int main (int argc, char *argv[])
}

l_ctx_min = 0;
l_ctx_max = l_cnt;

if (last_iter) break;
}

0 comments on commit cc37ab6

Please sign in to comment.