From b7c4973549b077228dbc73b8ea5b6cfab69d4ca2 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 Jun 2023 23:56:34 +0200 Subject: [PATCH] Fixed a off by one error in device.c. --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 8c8ede245..2636634c3 100644 --- a/src/device.c +++ b/src/device.c @@ -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);