Replay: The number of elements in a char array can be obtained using SIZEOF

This commit is contained in:
muramura 2024-09-21 00:39:58 +09:00 committed by Peter Barker
parent 1f5b88cf3b
commit 8f5861283b
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ void MsgHandler::field_not_found(uint8_t *msg, const char *label)
{
char all_labels[256];
uint8_t type = msg[2];
string_for_labels(all_labels, 256);
string_for_labels(all_labels, ARRAY_SIZE(all_labels));
::printf("Field (%s) not found for id=%d; options are (%s)\n",
label, type, all_labels);
abort();