diff --git a/src/hci.c b/src/hci.c index 04b22b228..2bd687b0d 100644 --- a/src/hci.c +++ b/src/hci.c @@ -3531,6 +3531,10 @@ static void orderFactories(void) { inc = 0; type++; + if (type > NUM_FACTORY_TYPES) + { + type = 0; + } } objectInc = 0; }