mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
reset errno prior to reading control input #1901
This commit is contained in:
parent
672a761080
commit
cefc98f55b
@ -1253,6 +1253,7 @@ control_read(int ttyfd, query_state* qstate){
|
||||
if((buf = malloc(BUFSIZ)) == NULL){
|
||||
return -1;
|
||||
}
|
||||
errno = 0;
|
||||
while((s = read(ttyfd, buf, BUFSIZ)) != -1){
|
||||
for(ssize_t idx = 0; idx < s ; ++idx){
|
||||
int r = pump_control_read(qstate, buf[idx]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user