Skip to content

Commit

Permalink
rvvm: Fix MMIO op size validation
Browse files Browse the repository at this point in the history
  • Loading branch information
LekKit authored Oct 31, 2023
1 parent 223b753 commit efdd69d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rvvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ PUBLIC rvvm_mmio_handle_t rvvm_attach_mmio(rvvm_machine_t* machine, const rvvm_m
{
rvvm_mmio_dev_t dev = *mmio;
dev.machine = machine;
if (mmio->min_op_size > mmio->max_op_size || mmio->max_op_size > 8) {
if (mmio->min_op_size > mmio->max_op_size || mmio->min_op_size > 8) {
rvvm_warn("MMIO device \"%s\" has invalid op sizes: min %u, max %u",
mmio->type ? mmio->type->name : "null", mmio->min_op_size, mmio->max_op_size);
rvvm_cleanup_mmio(&dev);
Expand Down

0 comments on commit efdd69d

Please sign in to comment.