it seems to me that the `while (IsCharAlphaNumericA(whichcmd[count]))` loop (above your change) is the culprit
didn't test it, but it's very likely that `for_` `for+` `for.bat` `for.exe` (to name a few) should not be interpreted as `for` command
you should add tests to confirm (or infirm) this assumption and fix the loop accordingly
I wouldn't be surprised if something like (didn't think off all the possible characters)
``` while (strchr(" \t()<>|,=;", whichcmd[count]) == NULL) ```
would be more suited