add packaging
[platform/upstream/ncurses.git] / packaging / ncurses-5.9-overflow.dif
1 --- ncurses/base/lib_getch.c
2 +++ ncurses/base/lib_getch.c    2012-07-31 09:50:17.972509406 +0000
3 @@ -174,7 +174,7 @@ static NCURSES_INLINE int
4  fifo_pull(SCREEN *sp)
5  {
6      int ch;
7 -    ch = sp->_fifo[head];
8 +    ch = (head != -1) ? sp->_fifo[head] : ERR;
9      TR(TRACE_IEVENT, ("pulling %s from %d", _nc_tracechar(sp, ch), head));
10  
11      if (peek == head) {