Fixed a off by one error in device.c.

This commit is contained in:
OBattler
2023-06-18 23:56:34 +02:00
parent 29fe9b4d1e
commit b7c4973549

View File

@@ -142,7 +142,7 @@ device_add_common(const device_t *d, const device_t *cd, void *p, void *params,
void *priv = NULL;
int c;
for (c = 0; c < 256; c++) {
for (c = 0; c <= 256; c++) {
if (!inst && (devices[c] == (device_t *) d)) {
device_log("DEVICE: device already exists!\n");
return (NULL);