Fix main() detection in mangling script

This commit is contained in:
KeybadeBlox 2026-02-19 21:06:17 -05:00
parent 522bf8be7f
commit 73b59a95cd

View file

@ -141,7 +141,7 @@ public class MSVC7Mangle extends GhidraScript {
// main() and extern "C" symbols get C name mangling // main() and extern "C" symbols get C name mangling
// (some other things, do, too, but just use extern "C" instead // (some other things, do, too, but just use extern "C" instead
// of making me find and list them all...) // of making me find and list them all...)
return nameRaw == "main" || return nameRaw.equals("main") ||
nameRaw.startsWith("extern_\"C\"::") ? mangleCFn (f) nameRaw.startsWith("extern_\"C\"::") ? mangleCFn (f)
: mangleCppFn(f); : mangleCppFn(f);
} }