nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.97k stars 187 forks source link

Handle full read buffer in read_up_to. #52

Closed adsr closed 9 years ago

adsr commented 9 years ago

This avoids assert(!"unreachable"); in the case where we try to read n=ENOUGH_DATA_FOR_PARSING bytes and get all n in one read. I noticed this while pasting a large chunk of text into a program blocked on tb_poll_event.

nsf commented 9 years ago

Yeah, sorry, I wanted to implement it but was busy and stuff.. Will pull it now.

nsf commented 9 years ago

Thanks!