Pin field order on types the rename policy declines to rename

pull/36/head
olivato 2026-09-01 16:29:23 +01:00
parent b3ef0049fc
commit 7ea47268d4
1 changed files with 5 additions and 1 deletions

View File

@ -87,8 +87,12 @@ namespace Obfuz.ObfusPasses.SymbolObfus
return !_renamePolicy.NeedRename(method); return !_renamePolicy.NeedRename(method);
} }
private static bool MayReorderFields(TypeDef type) private bool MayReorderFields(TypeDef type)
{ {
if (!_renamePolicy.NeedRename(type))
{
return false;
}
if (type.IsEnum || type.IsValueType) if (type.IsEnum || type.IsValueType)
{ {
return false; return false;