mirror of
https://github.com/Perfare/Il2CppDumper.git
synced 2025-01-26 10:43:02 -03:00
Merge pull request #477 from soyasoya5/bugfix/ida_keywords
fix certain keywords not allowed by IDA even if prepended by '_'
This commit is contained in:
commit
2bc03a5fd2
1 changed files with 9 additions and 2 deletions
|
@ -27,8 +27,10 @@ namespace Il2CppDumper
|
||||||
private StringBuilder methodInfoHeader = new StringBuilder();
|
private StringBuilder methodInfoHeader = new StringBuilder();
|
||||||
private static HashSet<ulong> methodInfoCache = new HashSet<ulong>();
|
private static HashSet<ulong> methodInfoCache = new HashSet<ulong>();
|
||||||
private static HashSet<string> keyword = new HashSet<string>(StringComparer.Ordinal)
|
private static HashSet<string> keyword = new HashSet<string>(StringComparer.Ordinal)
|
||||||
{ "klass", "monitor", "register", "_cs", "auto", "friend", "template", "near", "far", "flat", "default", "_ds", "interrupt", "inline",
|
{ "klass", "monitor", "register", "_cs", "auto", "friend", "template", "flat", "default", "_ds", "interrupt",
|
||||||
"unsigned", "signed", "asm", "if", "case", "break", "continue", "do", "new", "_", "short", "union"};
|
"unsigned", "signed", "asm", "if", "case", "break", "continue", "do", "new", "_", "short", "union", "class"};
|
||||||
|
private static HashSet<string> specialKeywords = new HashSet<string>(StringComparer.Ordinal)
|
||||||
|
{ "inline", "near", "far" };
|
||||||
|
|
||||||
public StructGenerator(Il2CppExecutor il2CppExecutor)
|
public StructGenerator(Il2CppExecutor il2CppExecutor)
|
||||||
{
|
{
|
||||||
|
@ -494,6 +496,11 @@ namespace Il2CppDumper
|
||||||
{
|
{
|
||||||
str = "_" + str;
|
str = "_" + str;
|
||||||
}
|
}
|
||||||
|
else if (specialKeywords.Contains(str))
|
||||||
|
{
|
||||||
|
str = "_" + str + "_";
|
||||||
|
}
|
||||||
|
|
||||||
if (Regex.IsMatch(str, "^[0-9]"))
|
if (Regex.IsMatch(str, "^[0-9]"))
|
||||||
{
|
{
|
||||||
return "_" + str;
|
return "_" + str;
|
||||||
|
|
Loading…
Add table
Reference in a new issue