diff --git a/docs/changes.txt b/docs/changes.txt
index b02a32f55..fc7ce35d9 100644
--- a/docs/changes.txt
+++ b/docs/changes.txt
@@ -12,6 +12,7 @@
 ##
 
 - Fixed maximum password length in modules of hash-modes 600, 7800, 7801 and 9900
+- Fixed non-zero status code when using --stdout
 - Fixed uninitialized value in bitsliced DES kernel (BF mode only) leading to false negatives
 
 ##
diff --git a/src/hashcat.c b/src/hashcat.c
index bf1a7e1f2..3648df812 100644
--- a/src/hashcat.c
+++ b/src/hashcat.c
@@ -1214,7 +1214,7 @@ int hashcat_session_execute (hashcat_ctx_t *hashcat_ctx)
 
   logfile_top_msg ("STOP");
 
-  // free memory
+  // set final status code
 
   if (rc_final == 0)
   {
@@ -1227,6 +1227,16 @@ int hashcat_session_execute (hashcat_ctx_t *hashcat_ctx)
     if (status_ctx->devices_status == STATUS_ERROR)               rc_final = -1;
   }
 
+  // special case for --stdout
+
+  if (user_options->stdout_flag == true)
+  {
+    if (status_ctx->devices_status == STATUS_EXHAUSTED)
+    {
+      rc_final = 0;
+    }
+  }
+
   // done
 
   return rc_final;