1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 12:27:52 +00:00

Unbreak alias stuff.

It was broken by commit 98c64d8b3e, I did
a lowsy job of checking the patch over.
This commit is contained in:
Brenden Matthews 2009-03-16 13:21:09 -06:00
parent 21e9964c5a
commit 41b62122f5

View File

@ -2805,7 +2805,9 @@ static int extract_variable_text_internal(struct text_object *retval, const char
var = getenv(buf);
/* if variable wasn't found in environment, use some special */
if (!var) {
if (var) {
strncpy(buf, var, 255);
}
arg = 0;
/* split arg */
@ -2834,7 +2836,6 @@ static int extract_variable_text_internal(struct text_object *retval, const char
if (obj != NULL) {
append_object(retval, obj);
}
}
continue;
} else {
obj = create_plain_text("$");
@ -7313,9 +7314,9 @@ static void load_config_file(const char *f)
CONF("alias") {
if (value) {
char skey[256], svalue[256];
char skey[1024], svalue[1024];
char *oldvalue;
if (sscanf(value, "%255[0-9a-zA-Z_] %255[^\n]", skey, svalue) == 2) {
if (sscanf(value, "%1023[0-9a-zA-Z_] %1023[^\n]", skey, svalue) == 2) {
oldvalue = getenv(skey);
if (oldvalue == NULL) {
setenv(skey, svalue, 0);