mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-19 11:33:51 +08:00
fix: for netbsd ppl, executable dir could be null, (@khorben)
8e51b68e83
This commit is contained in:
parent
8d02f4aabc
commit
79ed9c3887
1 changed files with 6 additions and 1 deletions
|
@ -69,7 +69,12 @@ bool endsWith (char* base, char* str) {
|
|||
*/
|
||||
int CmdScriptList(const char *Cmd) {
|
||||
|
||||
char script_directory_path[strlen(get_my_executable_directory()) + strlen(LUA_SCRIPTS_DIRECTORY) + 1];
|
||||
char const * exedir = get_my_executable_directory();
|
||||
strcpy(script_directory_path, get_my_executable_directory());
|
||||
if (exedir == NULL)
|
||||
return 0;
|
||||
char script_directory_path[strlen(exedir) + strlen(LUA_SCRIPTS_DIRECTORY) + 1];
|
||||
strcpy(script_directory_path, exedir);
|
||||
strcpy(script_directory_path, get_my_executable_directory());
|
||||
strcat(script_directory_path, LUA_SCRIPTS_DIRECTORY);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue