Skip to content

Conversation

alanjian85
Copy link
Collaborator

Even though the commit ff46dad has shortened the map code, I found that it may be incorrect because the second parameter passed to the function rb_set_parent on line 537 is *indirect, which was just assigned to the value of new node in the previous statement. I added a variable parent to store the previous value of indirect before any changes were made and set it as the parent of new_node as the old code intended.

Even though the commit ff46dad has
shortened the map code, I found that it may be incorrect because the
second parameter passed to the function "rb_set_parent" on line 537 is
"*indirect", which was just assigned to the value of new node in the
previous statement. I added a variable "parent" to store the previous
value of "indirect" before any changes were made and set it as the
parent of "new_node" as the old code intended.
@jserv jserv requested a review from steven1lung October 19, 2022 13:49
@steven1lung
Copy link
Collaborator

Looks good to me.

@jserv jserv merged commit 16dffcd into sysprog21:master Oct 19, 2022
vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
Even though the commit 6161d53 has
shortened the map code, I found that it may be incorrect because the
second parameter passed to the function "rb_set_parent" on line 537 is
"*indirect", which was just assigned to the value of new node in the
previous statement. I added a variable "parent" to store the previous
value of "indirect" before any changes were made and set it as the
parent of "new_node" as the old code intended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants