1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

If there are more devices than nDevs, don't iterate over them as they may overwrite devices mapped below that with the mapping option.

This commit is contained in:
Con Kolivas 2012-08-15 11:55:30 +10:00
parent 78d6019330
commit afa7310e9c

3
adl.c
View File

@ -339,6 +339,9 @@ void init_adl(int nDevs)
} }
} }
if (devices > nDevs)
devices = nDevs;
for (gpu = 0; gpu < devices; gpu++) { for (gpu = 0; gpu < devices; gpu++) {
struct gpu_adl *ga; struct gpu_adl *ga;
int iAdapterIndex; int iAdapterIndex;