diff --git a/include/types.h b/include/types.h index f0beeabbb..aa577f2be 100644 --- a/include/types.h +++ b/include/types.h @@ -224,6 +224,13 @@ typedef enum status_rc } status_rc_t; +typedef enum rc_final +{ + RC_FINAL_OK = 0, + RC_FINAL_EXHAUSTED = 1 + +} rc_final_t; + typedef enum wl_mode { WL_MODE_NONE = 0, diff --git a/src/hashcat.c b/src/hashcat.c index 53619dca6..517fb5465 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -1812,8 +1812,8 @@ int hashcat_session_execute (hashcat_ctx_t *hashcat_ctx) if (status_ctx->devices_status == STATUS_ABORTED_CHECKPOINT) rc_final = 3; if (status_ctx->devices_status == STATUS_ABORTED) rc_final = 2; if (status_ctx->devices_status == STATUS_QUIT) rc_final = 2; - if (status_ctx->devices_status == STATUS_EXHAUSTED) rc_final = 1; - if (status_ctx->devices_status == STATUS_CRACKED) rc_final = 0; + if (status_ctx->devices_status == STATUS_EXHAUSTED) rc_final = RC_FINAL_EXHAUSTED; + if (status_ctx->devices_status == STATUS_CRACKED) rc_final = RC_FINAL_OK; if (status_ctx->devices_status == STATUS_ERROR) rc_final = -1; } else if (rc_final == -1)