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