summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouie <lshprung@yahoo.com>2020-07-02 20:40:57 -0700
committerlouie <lshprung@yahoo.com>2020-07-02 20:40:57 -0700
commitcc42c7ac59b1ce403d117fb73a761668425d930b (patch)
tree22d77d3410a64cfeb16a99bb81886f5c2e18c23b
parent7e8fc4779554ebee40aca0de544c7409e4f75bd9 (diff)
Fixed small strcat bug
-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;