("Set lower case for variables or vectors in command 'echo'.
Tokens starting with '$' will get lower-casing.", 2024-09-07)

Don't use s as name for temporary string, as s has been set
already and is used later.
This commit is contained in:
Holger Vogt 2024-09-13 11:35:28 +02:00
parent 09685dde1c
commit b14420803a
1 changed files with 5 additions and 5 deletions

View File

@ -1669,14 +1669,14 @@ static struct inp_read_t inp_read(FILE* fp, int call_depth, const char* dir_name
}
/* lower case for variables or vectors in command 'echo' */
if (ciprefix("echo", buffer)) {
char* p = buffer;
char* p = buffer, *tmpstr;
while (p && *p != '\n' && *p != '\0') {
p = nexttok(p);
/* vectors or variables start with $ */
if (p && *p == '$') {
for (s = p; *s && !isspace_c(*s); s++)
*s = tolower_c(*s);
p = s;
for (tmpstr = p; *tmpstr && !isspace_c(*tmpstr); tmpstr++)
*tmpstr = tolower_c(*tmpstr);
p = tmpstr;
}
}
}
@ -1961,7 +1961,7 @@ char *inp_pathresolve(const char *name)
/* Figure out if name starts with: environmental variables (replace them),
~/ (expand the tilde), absolute path name, all others and return the
absolute path name, ~/ (expand the tilde), all others and return the
path, if file exists. */
static char *inp_pathresolve_at(const char *name, const char *dir)
{