sacc

sacc (saccomys): simple gopher client.
Log | Files | Refs | LICENSE

commit 27cb63c816b91708b4c4650709490b14cd5ac59e
parent 802d765ffd723b0e3298d6f070bf5301ae0ddadd
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 25 Feb 2018 16:34:33 +0100

sendselector(): fix written bytes check

Diffstat:
sacc.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sacc.c b/sacc.c @@ -386,7 +386,7 @@ sendselector(int sock, const char *selector) msg = p = xmalloc(ln); snprintf(msg, ln--, "%s\r\n", selector); - while ((n = write(sock, p, ln)) != -1 && n != 0) { + while ((n = write(sock, p, ln)) > 0) { ln -= n; p += n; }