Fix the GPU Platform fix
authorjsteube <jens.steube@gmail.com>
Thu, 31 Dec 2015 14:31:21 +0000 (15:31 +0100)
committerjsteube <jens.steube@gmail.com>
Thu, 31 Dec 2015 14:31:21 +0000 (15:31 +0100)
src/oclHashcat.c

index a93c68c..fc46cb1 100644 (file)
@@ -12294,10 +12294,14 @@ int main (int argc, char **argv)
 
           return (-1);
         }
+
+        // user does not count with zero
+
+        CL_platform_sel -= 1;
       }
     }
 
-    cl_platform_id CL_platform = CL_platforms[CL_platform_sel - 1];
+    cl_platform_id CL_platform = CL_platforms[CL_platform_sel];
 
     char CL_platform_vendor[INFOSZ];