Menu

#2 Bug found (and fixed) in locating devices

open
nobody
None
5
2010-01-07
2010-01-07
Anonymous
No

I found a bug in the source file that was causing it to always report that the found device was not available. I fixed it by changing the following lines:

if ( i == foundDevices ) {

//searched to end of list without result

fprintf(stderr, "Device %d is not available.\n", deviceID);

exit(EX_UNAVAILABLE); /* error */

}

To:

if ( i > foundDevices ) {

//searched to end of list without result

fprintf(stderr, "Device %d is not available.\n", deviceID);

exit(EX_UNAVAILABLE); /* error */

}

Once I made this change and recompiled, it works great.

Good work, btw.

Discussion


Log in to post a comment.