You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Whilst dereferencing a pointer to an enumeration the value does get converted into the enum name, when dereferencing an array it doesn't. (See the 2 lines below - from the included zip.) *pmap = _FREE_PARA; preg->last_failed_alloc[page_index] = 0xf1; 0xf1 is defined as _NO_FAILED_ALLOC
To Reproduce
Steps to reproduce the behavior:
Load in the enclosed function (from the Decompile:Panels Debug Function Decompilation menu)
See error
Expected behavior
Array dereferencing should work the same as pointer dereferecing wrt enumeration usage.
@Wall-AF
In the XML file you sent the "last_failed_alloc" field is of type array[1024] with elements of type __map_t which is defined as uchar, hence this is why it doesn't recognize the enum. The "pmap", on the other hand, is defined as __map_t*, and that __map_t is a different one, although named the same, and is defined as, I think, a typedef (?) to enum__map_t, which is your enum, so it recognizes enum there.
So the issue here is caused by you typing your array as uchar instead of enum due to having two types named the same or a typedef named the same that points to a different type.
Describe the bug
Whilst dereferencing a pointer to an enumeration the value does get converted into the enum name, when dereferencing an array it doesn't. (See the 2 lines below - from the included zip.)
*pmap = _FREE_PARA;
preg->last_failed_alloc[page_index] = 0xf1;
0xf1
is defined as_NO_FAILED_ALLOC
To Reproduce
Steps to reproduce the behavior:
Decompile:
PanelsDebug Function Decompilation
menu)Expected behavior
Array dereferencing should work the same as pointer dereferecing wrt enumeration usage.
Screenshots
N/A.
Attachments
__sbh_free_block.zip
Environment (please complete the following information):
Additional context
Fixing this may help with other array issues.
The text was updated successfully, but these errors were encountered: