mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-16 10:03:04 -07:00
rename global session
This commit is contained in:
parent
6a2f2b3979
commit
dd3b63ae32
20 changed files with 258 additions and 258 deletions
|
@ -237,14 +237,14 @@ bool create_path(const char *dirname) {
|
|||
bool setDefaultPath(savePaths_t pathIndex, const char *Path) {
|
||||
|
||||
if (pathIndex < spItemCount) {
|
||||
if ((Path == NULL) && (session.defaultPaths[pathIndex] != NULL)) {
|
||||
free(session.defaultPaths[pathIndex]);
|
||||
session.defaultPaths[pathIndex] = NULL;
|
||||
if ((Path == NULL) && (g_session.defaultPaths[pathIndex] != NULL)) {
|
||||
free(g_session.defaultPaths[pathIndex]);
|
||||
g_session.defaultPaths[pathIndex] = NULL;
|
||||
}
|
||||
|
||||
if (Path != NULL) {
|
||||
session.defaultPaths[pathIndex] = (char *)realloc(session.defaultPaths[pathIndex], strlen(Path) + 1);
|
||||
strcpy(session.defaultPaths[pathIndex], Path);
|
||||
g_session.defaultPaths[pathIndex] = (char *)realloc(g_session.defaultPaths[pathIndex], strlen(Path) + 1);
|
||||
strcpy(g_session.defaultPaths[pathIndex], Path);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue