Fix longstanding bug with buffer pointer goes beyoud buffer start
Cause initscr (ncurses) fail in some cases
This commit is contained in:
@@ -47,7 +47,7 @@ int len; {
|
||||
c = getc(f);
|
||||
}
|
||||
|
||||
while(isspace(*(buf-1))) {
|
||||
while(i > 0 && isspace(*(buf-1))) {
|
||||
buf--;
|
||||
i--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user