nmak

makao card game
git clone git://git.kocotian.pl/nmak.git
Log | Files | Refs | README | LICENSE

commit 07b46a160f960c8d3a98e995b3d0535d5f85e73e
parent b64f9486baf467dc88d8c9bf5d3bef1c51b25591
Author: kocotian <kocotian@kocotian.pl>
Date:   Tue, 16 Feb 2021 10:10:54 +0100

fixed sending 38 bytes instead of 48 on update

Diffstat:
Mnchk.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nchk.c b/nchk.c @@ -262,10 +262,10 @@ message(struct sockaddr_in addr, char *msg, size_t msgsiz, char **buf, size_t bu static void sendupdate(int16_t *checkers, struct sockaddr_in addr) { - char msg[39]; + char msg[49]; msg[0] = 'U'; - memcpy(msg + 1, checkers, 38); - if (message(addr, msg, 39, NULL, 0) < 0) + memcpy(msg + 1, checkers, 48); + if (message(addr, msg, 49, NULL, 0) < 0) die("message:"); }