Permalink
Browse files

Restore the old behaviour of the event loop. Fixes #22.

  • Loading branch information...
1 parent c11c708 commit 104ed5ad8fe84063e5681cbf8416b846ace7d52c @nsf committed Sep 5, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/termbox.c
View
@@ -518,7 +518,8 @@ static int wait_fill_event(struct tb_event *event, struct timeval *timeout)
assert(errno != EAGAIN && errno != EWOULDBLOCK);
return -1;
}
- assert(r > 0);
+ if (r == 0)
+ continue;
bytebuffer_resize(&input_buffer, prevlen + r);
if (extract_event(event, &input_buffer, inputmode))
return TB_EVENT_KEY;

0 comments on commit 104ed5a

Please sign in to comment.