]> granicus.if.org Git - libevent/commitdiff
sample/ssl-client-mbedtls.c: fix printing response in readcb
authorAzat Khuzhin <azat@libevent.org>
Sat, 9 Jul 2022 18:03:36 +0000 (21:03 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sat, 9 Jul 2022 18:07:49 +0000 (21:07 +0300)
sample/ssl-client-mbedtls.c

index b63681d2c19a4c1b3bd5b5b7d9947abac94b8f3d..39b8d64db518c7d6d537dcc2bfba993de99f31cb 100644 (file)
@@ -70,7 +70,7 @@ readcb(struct bufferevent *bev, void *arg)
                fprintf(stderr, "readcb %zu\n\n", r);
                if (r > 1) {
                        fwrite(buf, 1, r, stdout);
-                       fwrite("\n", 1, r, stdout);
+                       fwrite("\n", 1, 1, stdout);
                        fflush(stdout);
                }
        }