ugh, dumb error in control_read() led to iterated reads

pull/1764/head
nick black 3 years ago
parent 03d1e4fb5a
commit dae208b4c5
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -890,7 +890,7 @@ control_read(tinfo* tcache, int ttyfd){
if((buf = malloc(BUFSIZ)) == NULL){
return -1;
}
while((s = read(ttyfd, buf, sizeof(buf))) != -1){
while((s = read(ttyfd, buf, BUFSIZ)) != -1){
for(ssize_t idx = 0; idx < s ; ++idx){
int r = pump_control_read(&inits, buf[idx]);
if(r == 1){ // success!

Loading…
Cancel
Save