mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-09 07:11:03 +00:00
Fix OpenCL platform selection
This commit is contained in:
parent
06b1a1e2ae
commit
04e5ad2d54
@ -12281,16 +12281,23 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
printf ("* %d = %s\n", i + 1, CL_platform_vendor);
|
printf ("* %d = %s\n", i + 1, CL_platform_vendor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (-1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CL_platform_sel = atoi (gpu_platform);
|
CL_platform_sel = atoi (gpu_platform);
|
||||||
}
|
|
||||||
|
|
||||||
return (-1);
|
if (CL_platform_sel > CL_platforms_cnt)
|
||||||
|
{
|
||||||
|
log_error ("ERROR: invalid OpenCL platforms selected");
|
||||||
|
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cl_platform_id CL_platform = CL_platforms[CL_platform_sel];
|
cl_platform_id CL_platform = CL_platforms[CL_platform_sel - 1];
|
||||||
|
|
||||||
char CL_platform_vendor[INFOSZ];
|
char CL_platform_vendor[INFOSZ];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user