Move pb string length method and fix linker error

This commit is contained in:
Ben Meadors
2026-02-08 10:14:40 -06:00
parent 370f62a8c9
commit 81bde47cd4
4 changed files with 16 additions and 27 deletions
+1 -10
View File
@@ -2,16 +2,7 @@
#include <unity.h>
#include "TestUtil.h"
/**
* Get actual string length for nanopb char array fields.
* Nanopb stores strings as fixed-size char arrays that may contain embedded nulls.
* strlen() would stop at the first null, but we need to find the last non-null character.
* This is critical for Android UIDs that can contain 0x00 bytes (e.g., ANDROID-e7e455b40002429d).
*
* Use the firmware implementation declared elsewhere so tests exercise the same logic.
*/
extern size_t pb_string_length(const char *str, size_t max_len);
#include "meshUtils.h"
void setUp(void)
{