# HG changeset patch # User Olaf Wintermann # Date 1662747443 -7200 # Node ID a5698877d14a32fb5245fc0aae7a1885d9f0f009 # Parent 9e2289c77b0492681cc2315513f9c9601a449288 fix net_printf not working with empty strings diff -r 9e2289c77b04 -r a5698877d14a src/server/util/io.c --- a/src/server/util/io.c Thu Sep 08 17:34:16 2022 +0200 +++ b/src/server/util/io.c Fri Sep 09 20:17:23 2022 +0200 @@ -735,7 +735,7 @@ va_list arg; va_start(arg, format); sstr_t buf = ucx_vasprintf(ucx_default_allocator(), format, arg); - ssize_t r = net_write(fd, buf.ptr, buf.length); + ssize_t r = buf.length > 0 ? net_write(fd, buf.ptr, buf.length) : 0; free(buf.ptr); va_end(arg); if(r < 0) {