Skip to content

Commit

Permalink
address valgrind warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamiras committed Aug 1, 2024
1 parent d1a6fa1 commit e47d5e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rcheevos/runtime_progress.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static int rc_runtime_progress_is_indirect_memref(rc_operand_t* oper)
return 0;

default:
if (oper->value.memref->value.type != RC_MEMREF_TYPE_MODIFIED_MEMREF)
if (oper->value.memref->value.memref_type != RC_MEMREF_TYPE_MODIFIED_MEMREF)
return 0;

return ((const rc_modified_memref_t*)oper->value.memref)->modifier_type == RC_OPERATOR_INDIRECT_READ;
Expand Down
2 changes: 2 additions & 0 deletions test/rcheevos/test_memref.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,8 @@ static void test_allocate_shared_indirect_address() {
/* intermediate parent */
intermediate2.value.memref = &child2->memref;
intermediate2.type = RC_OPERAND_ADDRESS;
intermediate2.size = RC_MEMSIZE_32_BITS;
intermediate2.memref_access_type = RC_OPERAND_ADDRESS;
child4 = rc_alloc_modified_memref(&parse, RC_MEMSIZE_8_BITS, &intermediate2, RC_OPERATOR_INDIRECT_READ, &offset0);
ASSERT_NUM_EQUALS(get_memref_count(&parse), 8);

Expand Down

0 comments on commit e47d5e1

Please sign in to comment.