Fixed a off by one error in device.c.
This commit is contained in:
@@ -142,7 +142,7 @@ device_add_common(const device_t *d, const device_t *cd, void *p, void *params,
|
|||||||
void *priv = NULL;
|
void *priv = NULL;
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
for (c = 0; c < 256; c++) {
|
for (c = 0; c <= 256; c++) {
|
||||||
if (!inst && (devices[c] == (device_t *) d)) {
|
if (!inst && (devices[c] == (device_t *) d)) {
|
||||||
device_log("DEVICE: device already exists!\n");
|
device_log("DEVICE: device already exists!\n");
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Reference in New Issue
Block a user