hf mf view: clear the RKF TCAS padding before comparing instances

rkf_tcas_t has a padding byte before mac (offset 31). rkf_read_tcas()
set every field but left that byte, and both the TCAS instance check
in hf mf view and its selftest compare the two instances with memcmp.
The result depended on stack contents: the Makefile client passed, the
CMake client failed "tcas instances equal". Since 6fbe96e18 the CI
greps the aggregate Transit selftest line, so every cmake test job
(ubuntu, macos, wsl, proxspace) failed.

Zero the whole struct in rkf_read_tcas().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
iceman1001andClaude Opus 5.5 committed 2026-11-10 12:06:53 +07:00
1 parent 3203a2018d
commit 1eae2e2d34
1 file changed
+1
+1
View File
@@ -817,6 +817,7 @@ static const char *rkf_log_slot(const rkf_tcas_t *t, uint8_t sector) {
}
static void rkf_read_tcas(const uint8_t *blk, rkf_tcas_t *t) {
memset(t, 0, sizeof(*t)); // padding too, instances are compared with memcmp
t->identifier = (uint8_t)rkf_bits(blk, 0, 8);
t->version = (uint8_t)rkf_bits(blk, 8, 6);
for (uint8_t s = 0; s < RKF_SECTORS; s++) {