Files
mc-webui/app
MarekWo bdcc68513d fix(paths): use library's change_contact_path to avoid negative int error
_change_path_async manually set out_path and out_path_len on the contact
dict then called update_contact(contact) with path=None. This path reads
out_path_hash_mode from the contact dict, which is -1 when the contact
is in flood mode (after reset_path or device read with plen=255).
The encoding then produced: hop_count | (-1 << 6) = negative number,
causing "can't convert negative int to unsigned" in to_bytes().

Fix: use mc.commands.change_contact_path() which properly computes all
fields including out_path_hash_mode, avoiding the negative value issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 20:07:35 +01:00
..