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:
parent
28bbae908b
commit
f4d2662dff
@ -105,7 +105,7 @@ struct reg_block *find_reg_block(struct reg_block *list, uint32_t type, uint32_t
|
|||||||
{
|
{
|
||||||
struct reg_block *rb = list;
|
struct reg_block *rb = list;
|
||||||
|
|
||||||
while (rb->type && rb->version && rb->regs)
|
while (rb->regs)
|
||||||
{
|
{
|
||||||
if (rb->type == type && (!version || rb->version == version))
|
if (rb->type == type && (!version || rb->version == version))
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ struct reg_block *find_reg_block(struct reg_block *list, u32 type, u32 version,
|
|||||||
{
|
{
|
||||||
struct reg_block *rb = list;
|
struct reg_block *rb = list;
|
||||||
|
|
||||||
while (rb->type && rb->version && rb->regs) {
|
while (rb->regs) {
|
||||||
if (rb->type == type && (!version || rb->version == version)) {
|
if (rb->type == type && (!version || rb->version == version)) {
|
||||||
if (index > 0)
|
if (index > 0)
|
||||||
index--;
|
index--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user