mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
buf.c: fix bug in environment variable expansion
Allow underscore in environment variable names. Closes issue #439 Helped-by: @Consolatis ...who both found the bug and told us how to fix it :)
This commit is contained in:
parent
884ad60e1b
commit
fd7ec0ab95
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ buf_expand_shell_variables(struct buf *s)
|
||||||
environment_variable.len = 0;
|
environment_variable.len = 0;
|
||||||
buf_add(&environment_variable, s->buf + i + 1);
|
buf_add(&environment_variable, s->buf + i + 1);
|
||||||
char *p = environment_variable.buf;
|
char *p = environment_variable.buf;
|
||||||
while (isalnum(*p) || *p == '{' || *p == '}') {
|
while (isalnum(*p) || *p == '_' || *p == '{' || *p == '}') {
|
||||||
++p;
|
++p;
|
||||||
}
|
}
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue