mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 10:43:01 +08:00
Look for aidlist.json in the client dir
This commit is contained in:
parent
402a442956
commit
581043bc90
1 changed files with 2 additions and 3 deletions
|
@ -87,10 +87,9 @@ static int smart_loadjson(const char *preferredName, const char *suffix, json_t
|
|||
if ( suffix == NULL ) return 1;
|
||||
|
||||
int retval = 0;
|
||||
int size = sizeof(char) * (strlen(preferredName) + strlen(suffix) + 10);
|
||||
int size = sizeof(char) * (strlen(get_my_executable_directory()) + strlen(preferredName) + strlen(suffix) + 10);
|
||||
char * fileName = calloc(size, sizeof(char));
|
||||
sprintf(fileName, "%s.%s", preferredName, suffix);
|
||||
|
||||
sprintf(fileName, "%s%s.%s", get_my_executable_directory(), preferredName, suffix);
|
||||
*root = json_load_file(fileName, 0, &error);
|
||||
if (!*root) {
|
||||
PrintAndLogEx(ERR, "json (%s) error on line %d: %s", fileName, error.line, error.text);
|
||||
|
|
Loading…
Reference in a new issue