diff --git a/lib/libmytinfo/findterm.c b/lib/libmytinfo/findterm.c index 1fe5a9b66a98..8fc41a0c48a8 100644 --- a/lib/libmytinfo/findterm.c +++ b/lib/libmytinfo/findterm.c @@ -47,7 +47,7 @@ int len; { c = getc(f); } - while(isspace(*(buf-1))) { + while(i > 0 && isspace(*(buf-1))) { buf--; i--; }