Fix adapter range detection (last adapter could not be used)

This commit is contained in:
goldsimon 2009-11-01 19:04:05 +00:00
parent e4442f02da
commit 77ab1cb406

View File

@ -171,7 +171,7 @@ init_adapter(int adapter_num, char *mac_addr, input_fn input, void *arg)
return NULL;
}
/* adapter index out of range */
if (adapter_num > AdapterNum) {
if (adapter_num >= AdapterNum) {
printf("Invalid adapter_num: %d\n", adapter_num);
free(pa);
return NULL;