speller: strip leading whitespace from command, to avoid a sneaky crash

This completes the fix for https://savannah.gnu.org/bugs/?59855.
master
Benno Schulenberg 2021-01-11 19:15:35 +01:00
parent 71402bb7e9
commit 735a608e80
1 changed files with 3 additions and 0 deletions

View File

@ -2166,6 +2166,9 @@ int main(int argc, char **argv)
free(alt_speller);
alt_speller = alt_speller_cmdline;
}
/* Strip leading whitespace from the speller command, if any. */
while (alt_speller && *alt_speller && isblank(*alt_speller))
alt_speller++;
#endif
/* If an rcfile undid the default settings, copy it to the new flags. */