Fix longstanding bug with buffer pointer goes beyoud buffer start

Cause initscr (ncurses) fail in some cases
This commit is contained in:
Andrey A. Chernov 1997-08-13 01:21:36 +00:00
parent f80feb0c50
commit aaf9cb20c9

View File

@ -47,7 +47,7 @@ int len; {
c = getc(f);
}
while(isspace(*(buf-1))) {
while(i > 0 && isspace(*(buf-1))) {
buf--;
i--;
}