diff --git a/src/nnn.c b/src/nnn.c index 4d9a60bb..3df95000 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -1540,7 +1540,7 @@ static char *findinsel(char *startpos, int len) startpos = pselbuf; char *found = startpos; - size_t buflen = selbuflen - (startpos - pselbuf); + size_t buflen = selbufpos - (startpos - pselbuf); while (1) { /*