ref: f54a8666413d80db3bda3de6e17f795faf7790eb
parent: 615575f7dca0e43ecb23c4ab1ea7fd2e93c4e3b4
author: rodri <[email protected]>
date: Thu Jul 22 23:43:39 EDT 2021
some corrections.
--- a/lobby.c
+++ b/lobby.c
@@ -35,7 +35,7 @@
lobby_leaveseat(Lobby *l, ulong idx)
{
if(idx < l->seats.cap-1)
- memmove(&l->seats.fds[idx], &l->seats.fds[idx+1], l->seats.cap*sizeof(int) - (l->seats.len + 1)*sizeof(int));
+ memmove(&l->seats.fds[idx], &l->seats.fds[idx+1], l->seats.cap*sizeof(int) - (idx + 1)*sizeof(int));
l->seats.len--;
return 0;
}
--- a/musw.c
+++ b/musw.c
@@ -16,7 +16,7 @@
while((n = ioread(io, fd, buf, sizeof buf)) > 0)
if(iowrite(io, 1, buf, n) != n)
- fprint(2, "iowrite: %r\n");
+ fprint(2, "netin iowrite: %r\n");
closeioproc(io);
}
@@ -32,7 +32,7 @@
while((n = ioread(io, 0, buf, sizeof buf)) > 0)
if(iowrite(io, fd, buf, n) != n)
- fprint(2, "iowrite: %r\n");
+ fprint(2, "netout iowrite: %r\n");
closeioproc(io);
}