]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdscript.c
PCF7931: Print found single/consecutive block(s), fixes to block 1 check
[proxmark3-svn] / client / cmdscript.c
index 23163aa98f128918b153c80a8ef26930519ca98c..7b0e9000d6b66acfbff31790008d54c768f4aaa9 100644 (file)
@@ -17,7 +17,6 @@
 
 #include "proxmark3.h"
 #include "scripting.h"
-#include "data.h"
 #include "ui.h"
 #include "graph.h"
 #include "cmdparser.h"
@@ -76,8 +75,11 @@ int CmdList(const char *Cmd)
 {
     DIR *dp;
     struct dirent *ep;
-       char script_directory_path[strlen(get_my_executable_directory()) + strlen(LUA_SCRIPTS_DIRECTORY) + 1];
-       strcpy(script_directory_path, get_my_executable_directory());
+       char const * exedir = 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);
        strcat(script_directory_path, LUA_SCRIPTS_DIRECTORY);
     dp = opendir(script_directory_path);
 
Impressum, Datenschutz