We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6b26917 + dc3bca5 commit 6a399a8Copy full SHA for 6a399a8
src/src/Helpers/_CPlugin_init.cpp
@@ -2070,7 +2070,7 @@ const CPlugin_ptr_t PROGMEM CPlugin_ptr[] =
2070
constexpr size_t ProtocolIndex_to_CPlugin_id_size = sizeof(ProtocolIndex_to_CPlugin_id);
2071
2072
// Highest CPlugin ID included in the build
2073
-constexpr size_t Highest_CPlugin_id = ProtocolIndex_to_CPlugin_id[ProtocolIndex_to_CPlugin_id_size - 1];
+constexpr size_t Highest_CPlugin_id = ProtocolIndex_to_CPlugin_id_size == 0 ? 0 : ProtocolIndex_to_CPlugin_id[ProtocolIndex_to_CPlugin_id_size - 1];
2074
2075
constexpr size_t CPlugin_id_to_ProtocolIndex_size = Highest_CPlugin_id + 1;
2076
0 commit comments