summaryrefslogtreecommitdiff
path: root/draw.c
diff options
context:
space:
mode:
Diffstat (limited to 'draw.c')
-rw-r--r--draw.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/draw.c b/draw.c
index fe41aa7..8f0d09f 100644
--- a/draw.c
+++ b/draw.c
@@ -269,21 +269,24 @@ void launch_entry(){
char *flags = get_gflags(g[g_hover]);
char *path = get_epath(e[e_hover]);
int mode = get_compmode();
+ char full_command[BUF_LEN];
//if the entry is an executable file (doesn't have a launcher)
if(!(strcmp(program, "./"))) system(path);
else{
if(mode != 0) path = compat_convert(path, mode);
- strcat(program, " \"");
+ full_command[0] = '\0';
+ strcat(full_command, program);
+ strcat(full_command, " \"");
if(flags[0] !='\0'){
- strcat(program, flags);
- strcat(program, "\"");
- strcat(program, " \"");
+ strcat(full_command, flags);
+ strcat(full_command, "\"");
+ strcat(full_command, " \"");
}
- strcat(program, path);
- strcat(program, "\"");
- system(program);
+ strcat(full_command, path);
+ strcat(full_command, "\"");
+ system(full_command);
}
return;