From 9977e310f86488cf988d3eec78b59b589c85fa0c Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sun, 24 May 2026 21:24:56 +0200 Subject: [PATCH] Fixed missing byteorder spec in nick color conversion for old snakes --- nomadnet/ui/textui/Channels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nomadnet/ui/textui/Channels.py b/nomadnet/ui/textui/Channels.py index 6a02747..3fe6d7b 100644 --- a/nomadnet/ui/textui/Channels.py +++ b/nomadnet/ui/textui/Channels.py @@ -1232,7 +1232,7 @@ def get_nick_color(sender_hash, theme, app, shift=15): try: sender_hash = sender_hash.encode("utf-8") except: pass if not type(sender_hash) == bytes: return theme["nick_peer"] - return nick_colors[(int.from_bytes(sender_hash)+shift)%len(nick_colors)] + return nick_colors[(int.from_bytes(sender_hash, "big")+shift)%len(nick_colors)] room_nick_src_cache = {} def get_nick_src(hub, room, nick):