Fix infinite loop on error in connection. - rohrpost - A commandline mail client to change the world as we see it.
 (HTM) git clone git://r-36.net/rohrpost
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit c0643797a45a87d020aff006c77be923b034d402
 (DIR) parent 6ddf9b917b96f8a5c4a758235b2a981671b531ac
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Thu, 18 Jul 2024 20:06:37 +0200
       
       Fix infinite loop on error in connection.
       
       Diffstat:
         M net.c                               |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/net.c b/net.c
       @@ -303,7 +303,7 @@ net_writeall(net_t *net, char *buf, int len)
                int olen, nlen;
        
                for (olen = 0;
       -                        (nlen = net_write(net, &buf[olen], len-olen))
       +                        (nlen = net_write(net, &buf[olen], len-olen)) >= 0
                                && olen < len;
                                olen += nlen);