Skip to content

Commit

Permalink
fix cb_asmarch
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed Nov 5, 2024
1 parent e3eada2 commit 509c504
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion librz/core/cconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ static bool cb_asmarch(void *user, void *data) {
RzConfigNode *asm_cpu_node = rz_config_node_get(core->config, "asm.cpu");
if (core->rasm->cur) {
const char *cpus = core->rasm->cur->cpus;
if (strstr(cpus, asm_cpu_node->value) == NULL) {
if (cpus && asm_cpu_node &&
((asm_cpu_node->value && strstr(cpus, asm_cpu_node->value) == NULL) || RZ_STR_ISEMPTY(asm_cpu_node->value))) {
if (RZ_STR_ISNOTEMPTY(cpus)) {
char *cpu0 = rz_str_dup(cpus);
char *comma = strchr(cpu0, ',');
Expand Down

0 comments on commit 509c504

Please sign in to comment.