diff --git a/examples/companion_radio/ui-orig/UITask.cpp b/examples/companion_radio/ui-orig/UITask.cpp index eee990f0..59db556d 100644 --- a/examples/companion_radio/ui-orig/UITask.cpp +++ b/examples/companion_radio/ui-orig/UITask.cpp @@ -134,7 +134,7 @@ void UITask::newMsg(uint8_t path_len, const char* from_name, const char* text, i if (path_len == 0xFF) { sprintf(_origin, "(F) %s", from_name); } else { - sprintf(_origin, "(%d) %s", (uint32_t) path_len, from_name); + sprintf(_origin, "(%d) %s", (uint32_t)(path_len & 63), from_name); // low 6 bits = hop count; high 2 bits are the path hash-size mode } StrHelper::strncpy(_msg, text, sizeof(_msg));