From 375bc566812b87d26b469f89d7f2bd2b841c4936 Mon Sep 17 00:00:00 2001 From: jsteube Date: Tue, 27 Sep 2016 13:30:29 +0200 Subject: [PATCH] Fix Input.Mode in status in maskfile mode --- src/status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/status.c b/src/status.c index dbd9e43c7..a2f647514 100644 --- a/src/status.c +++ b/src/status.c @@ -428,7 +428,9 @@ void status_display (opencl_ctx_t *opencl_ctx, const hashconfig_t *hashconfig, c if (mask_ctx->masks_cnt > 1) { - double mask_percentage = (double) mask_ctx->masks_pos / (double) mask_ctx->masks_cnt; + const int maks_pos_done = ((opencl_ctx->devices_status == STATUS_EXHAUSTED) && (opencl_ctx->run_main_level1 == true)) ? 1 : 0; + + double mask_percentage = (double) (mask_ctx->masks_pos + maks_pos_done) / (double) mask_ctx->masks_cnt; tmp_len += snprintf (tmp_buf + tmp_len, sizeof (tmp_buf) - tmp_len, " (%.02f%%)", mask_percentage * 100); }