Should only force 0-9 and ? as single-character variable names, not end of variable name

This commit is contained in:
K. Lange 2018-07-17 21:33:05 +09:00
parent 92ab1d99ac
commit 60accf8088

View File

@ -468,7 +468,7 @@ int shell_exec(char * buffer, size_t size, FILE * file) {
var[coll] = *p;
coll++;
var[coll] = '\0';
if (isdigit(*p) || *p == '?') {
if (coll == 0 && (isdigit(*p) || *p == '?')) {
p++;
break; /* Don't let these keep going */
}