diff options
-rw-r--r-- | src/config_bat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config_bat.c b/src/config_bat.c index b25f1cc..e55ecec 100644 --- a/src/config_bat.c +++ b/src/config_bat.c @@ -68,13 +68,13 @@ int config_bat_load(struct node* n) { } if(_bat_is_charging(batstatus) == 1) { - sprintf(n->text + strlen(n->text), "%lc", 0x26A1); + sprintf(n->text, "%lc", 0x26A1); } else { - strcat(n->text, " "); + strcpy(n->text, " "); } if(strcmp(n->display, "bar") == 0) { - print_bar(12, (float) level / 100, &n->text[3]); + print_bar(12, (float) level / 100, &n->text[strlen(n->text)]); } else { sprintf(n->text, "%02d%%", (int)(level / 100)); } |