ncurses/ncurses-5.9-overflow.dif

12 lines
357 B
Plaintext

--- ncurses/base/lib_getch.c
+++ ncurses/base/lib_getch.c 2012-07-31 09:50:17.972509406 +0000
@@ -174,7 +174,7 @@ static NCURSES_INLINE int
fifo_pull(SCREEN *sp)
{
int ch;
- ch = sp->_fifo[head];
+ ch = (head != -1) ? sp->_fifo[head] : ERR;
TR(TRACE_IEVENT, ("pulling %s from %d", _nc_tracechar(sp, ch), head));
if (peek == head) {