mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
Fix crash in Pattern Language syntax highlighting for self-inheriting structs (#2546)
``` rust
struct Rec : Rec {
};
```
Prevent infinite recursion in appendInheritances by erasing processed
inheritance entries during traversal, and safely iterate over
m_inheritances in appendInheritances to avoid
modification-during-iteration issues.
Co-authored-by: paxcut <53811119+paxcut@users.noreply.github.com>
This commit is contained in:
@@ -218,7 +218,7 @@ namespace hex::plugin::builtin {
|
||||
std::string getVariableTypeName();
|
||||
/// Append the variable definitions of the parent to the child
|
||||
void appendInheritances();
|
||||
void recurseInheritances(std::string name);
|
||||
void recurseInheritances(std::string name, size_t depth = 0);
|
||||
///Loads a map of identifiers to their token id instances
|
||||
void loadInstances();
|
||||
/// Replace auto with the actual type for template arguments and function parameters
|
||||
|
||||
Reference in New Issue
Block a user