Skip to content

Commit 6a399a8

Browse files
authored
Merge pull request #4871 from TD-er/bugfix/4870_empty_custom_build
[Build] Fix compile error when using default Custom.h (#4870)
2 parents 6b26917 + dc3bca5 commit 6a399a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/src/Helpers/_CPlugin_init.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,7 @@ const CPlugin_ptr_t PROGMEM CPlugin_ptr[] =
20702070
constexpr size_t ProtocolIndex_to_CPlugin_id_size = sizeof(ProtocolIndex_to_CPlugin_id);
20712071

20722072
// Highest CPlugin ID included in the build
2073-
constexpr size_t Highest_CPlugin_id = ProtocolIndex_to_CPlugin_id[ProtocolIndex_to_CPlugin_id_size - 1];
2073+
constexpr size_t Highest_CPlugin_id = ProtocolIndex_to_CPlugin_id_size == 0 ? 0 : ProtocolIndex_to_CPlugin_id[ProtocolIndex_to_CPlugin_id_size - 1];
20742074

20752075
constexpr size_t CPlugin_id_to_ProtocolIndex_size = Highest_CPlugin_id + 1;
20762076

0 commit comments

Comments
 (0)