Commit a5bbc4ae authored by Christoffer Ackelman's avatar Christoffer Ackelman

Fixed uninitialized string in the execute_flavour helper.

parent bf4a9b14
...@@ -977,10 +977,12 @@ unsigned int dcli_random() ...@@ -977,10 +977,12 @@ unsigned int dcli_random()
void dcli_execute_flavour_if_exists(char* argv[], const char* flavour) void dcli_execute_flavour_if_exists(char* argv[], const char* flavour)
{ {
pwr_tFileName file; pwr_tFileName file;
if (argv[0][0] != '/') { if (strchr(argv[0], '/')) {
strcpy(file, argv[0]);
} else {
strcpy(file, "$pwr_exe/"); strcpy(file, "$pwr_exe/");
strcat(file, argv[0]);
} }
strcat(file, argv[0]);
strcat(file, "_"); strcat(file, "_");
strcat(file, flavour); strcat(file, flavour);
dcli_translate_filename(file, file); dcli_translate_filename(file, file);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment