mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-10-23 17:23:23 +00:00
chg: some more checks in pathing
This commit is contained in:
1 parent
c1b03b7fc4
commit
ab38130c3e
2 files changed
+21
-16
No files matched your search
+5
-3
@@ -142,9 +142,11 @@ static int CmdScriptRun(const char *Cmd) {
|
||||
|
||||
bool found = false;
|
||||
int error;
|
||||
if (get_my_executable_directory() != NULL) {
|
||||
char script_path[strlen(get_my_executable_directory()) + strlen(LUA_SCRIPTS_DIRECTORY) + strlen(script_name) + strlen(suffix) + 1];
|
||||
strcpy(script_path, get_my_executable_directory());
|
||||
const char* exec_path = get_my_executable_directory();
|
||||
|
||||
if (exec_path != NULL) {
|
||||
char script_path[strlen(exec_path) + strlen(LUA_SCRIPTS_DIRECTORY) + strlen(script_name) + strlen(suffix) + 1];
|
||||
strcpy(script_path, exec_path);
|
||||
strcat(script_path, LUA_SCRIPTS_DIRECTORY);
|
||||
strcat(script_path, script_name);
|
||||
strcat(script_path, suffix);
|
||||
|
||||
Reference in new issue
Block a user