[dmenu] Fix small bug of passing right length.

This commit is contained in:
Dave Davenport 2022-04-23 23:17:51 +02:00
parent f5fce95330
commit 9314e75af2
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ static void read_input_sync(DmenuModePrivateData *pd, unsigned int pre_read) {
char *line = NULL;
while (pre_read > 0 &&
(nread = getdelim(&line, &len, pd->separator, pd->fd_file)) != -1) {
read_add(pd, line, len);
read_add(pd, line, nread);
pre_read--;
}
free(line);