1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

Fix find_reg_block handling of NULL register blocks

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich 2022-04-22 23:25:15 -07:00
parent 28bbae908b
commit f4d2662dff
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ struct reg_block *find_reg_block(struct reg_block *list, uint32_t type, uint32_t
{
struct reg_block *rb = list;
while (rb->type && rb->version && rb->regs)
while (rb->regs)
{
if (rb->type == type && (!version || rb->version == version))
{

View File

@ -101,7 +101,7 @@ struct reg_block *find_reg_block(struct reg_block *list, u32 type, u32 version,
{
struct reg_block *rb = list;
while (rb->type && rb->version && rb->regs) {
while (rb->regs) {
if (rb->type == type && (!version || rb->version == version)) {
if (index > 0)
index--;