diff --git a/include/engine/Port.hpp b/include/engine/Port.hpp index 748e71fc..c28549b3 100644 --- a/include/engine/Port.hpp +++ b/include/engine/Port.hpp @@ -198,6 +198,8 @@ struct Port { } // Set higher channel voltages to 0 for (int c = channels; c < this->channels; c++) { + if (c >= PORT_MAX_CHANNELS) + __builtin_unreachable(); voltages[c] = 0.f; } // Don't allow caller to set port as disconnected