diff --git a/example/scp_write_nonblock.c b/example/scp_write_nonblock.c index 688c8bb..801f86c 100644 --- a/example/scp_write_nonblock.c +++ b/example/scp_write_nonblock.c @@ -196,7 +196,7 @@ int main(int argc, char *argv[]) sent += rc; } } while (rc > 0 && sent < nread); - ptr += sent; + nread -= sent; } while (1);