Revert "no longer (unused) icon slot" for bugfix

This reverts commit 29485b43b0.
This commit is contained in:
Luke Smith
2020-04-22 20:09:51 -04:00
parent 93b951f715
commit 01e9f1a568
2 changed files with 23 additions and 19 deletions

View File

@@ -8,6 +8,7 @@
#define CMDLENGTH 50
typedef struct {
char* icon;
char* command;
unsigned int interval;
unsigned int signal;
@@ -55,6 +56,7 @@ void getcmd(const Block *block, char *output)
output[0] = block->signal;
output++;
}
strcpy(output, block->icon);
char* cmd;
FILE *cmdf;
if (button)
@@ -72,8 +74,10 @@ void getcmd(const Block *block, char *output)
}
if (!cmdf)
return;
fgets(output, CMDLENGTH, cmdf);
int i = strlen(output);
char c;
int i = strlen(block->icon);
fgets(output+i, CMDLENGTH-i, cmdf);
i = strlen(output);
if (delim != '\0' && i)
output[i++] = delim;
output[i++] = '\0';