small fix

This commit is contained in:
Russ Dill 2001-08-17 00:14:51 +00:00
parent 2297849ef4
commit b969dd1d22

View File

@ -37,7 +37,7 @@ static int read_str(char *line, void *arg)
/* elimate trailing whitespace */
for (i = strlen(*dest) - 1; i > 0 && isspace((*dest)[i]); i--);
(*dest)[i] = '\0';
(*dest)[i > 0 ? i + 1 : 0] = '\0';
return 1;
}