From 7621b76c7081049b6b93ee679cbd786dbb7d49a4 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 16 Apr 2025 02:16:57 +0100 Subject: Fix minor idiocy in msg.c I had at one point tried to macrofy the repetitive functions. After being talked down from that madness, I LSP-expanded all the macros out and went through rewriting the crazy expressions into constants. Except those two for some reason, because I'm blind I guess. Thanks bill for pointing this out. --- src/chunklets/msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/chunklets') diff --git a/src/chunklets/msg.c b/src/chunklets/msg.c index f49581b..a4f158b 100644 --- a/src/chunklets/msg.c +++ b/src/chunklets/msg.c @@ -258,12 +258,12 @@ int msg_rputssz16(unsigned char *end, int val) { int msg_putssz(unsigned char *out, unsigned int val) { if (val <= 65535) return msg_putssz16(out, val); doput32(out, 0xDB, val); - return (32) / 8 + 1; + return 5; } int msg_rputssz(unsigned char *end, unsigned int val) { if (val <= 65535) return msg_rputssz16(end, val); doput32(end - (32) / 8 - 1, 0xDB, val); - return (32) / 8 + 1; + return 5; } int msg_putbsz16(unsigned char *out, int val) { -- cgit v1.2.3-54-g00ecf