diff options
author | louie <lshprung@yahoo.com> | 2020-07-02 20:40:57 -0700 |
---|---|---|
committer | louie <lshprung@yahoo.com> | 2020-07-02 20:40:57 -0700 |
commit | cc42c7ac59b1ce403d117fb73a761668425d930b (patch) | |
tree | 22d77d3410a64cfeb16a99bb81886f5c2e18c23b /draw.c | |
parent | 7e8fc4779554ebee40aca0de544c7409e4f75bd9 (diff) |
Fixed small strcat bug
Diffstat (limited to 'draw.c')
-rw-r--r-- | draw.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -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; |