mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-28 01:41:48 +03:00
Fix infinite loop in exec example
This commit is contained in:
@ -36,7 +36,7 @@ int main(void) {
|
||||
}
|
||||
|
||||
|
||||
while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) >= 0) {
|
||||
while ((rc = channel_read(channel, buffer, sizeof(buffer), 0)) > 0) {
|
||||
fwrite(buffer, 1, rc, stdout);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user