mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 02:26:59 -07:00
fix missing terminating 0 in my_executable_directory (thanks @iceman1001).
fix warning about const used twice in get_my_executable_path() and get_my_executable_directory().
This commit is contained in:
parent
ebfb4447b8
commit
4a6bc37e70
2 changed files with 5 additions and 4 deletions
|
@ -199,12 +199,12 @@ static void dumpAllHelp(int markdown)
|
|||
static char *my_executable_path = NULL;
|
||||
static char *my_executable_directory = NULL;
|
||||
|
||||
const char const *get_my_executable_path(void)
|
||||
const char *get_my_executable_path(void)
|
||||
{
|
||||
return my_executable_path;
|
||||
}
|
||||
|
||||
const char const *get_my_executable_directory(void)
|
||||
const char *get_my_executable_directory(void)
|
||||
{
|
||||
return my_executable_directory;
|
||||
}
|
||||
|
@ -219,6 +219,7 @@ static void set_my_executable_path(void)
|
|||
my_executable_path[path_length] = '\0';
|
||||
my_executable_directory = (char *)malloc(dirname_length + 2);
|
||||
strncpy(my_executable_directory, my_executable_path, dirname_length+1);
|
||||
my_executable_directory[dirname_length+1] = '\0';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#define PROXPROMPT "proxmark3> "
|
||||
|
||||
void SendCommand(UsbCommand *c);
|
||||
const char const *get_my_executable_path(void);
|
||||
const char const *get_my_executable_directory(void);
|
||||
const char *get_my_executable_path(void);
|
||||
const char *get_my_executable_directory(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue