guard, fix coverity CID 408545

This commit is contained in:
iceman1001 2021-04-05 08:26:17 +02:00
commit e9df21d3ab

View file

@ -437,17 +437,19 @@ static void showSavePathState(savePaths_t path_index, prefShowOpt_t opt) {
strcpy(s, _RED_("unknown")" save path......");
}
if ((session.defaultPaths[path_index] == NULL) || (strcmp(session.defaultPaths[path_index], "") == 0)) {
PrintAndLogEx(INFO, " %s %s "_WHITE_("not set"),
prefShowMsg(opt),
s
);
} else {
PrintAndLogEx(INFO, " %s %s "_GREEN_("%s"),
prefShowMsg(opt),
s,
session.defaultPaths[path_index]
);
if (path_index < spItemCount) {
if ((session.defaultPaths[path_index] == NULL) || (strcmp(session.defaultPaths[path_index], "") == 0)) {
PrintAndLogEx(INFO, " %s %s "_WHITE_("not set"),
prefShowMsg(opt),
s
);
} else {
PrintAndLogEx(INFO, " %s %s "_GREEN_("%s"),
prefShowMsg(opt),
s,
session.defaultPaths[path_index]
);
}
}
}