Make sure HasFieldRVA flag is set

This commit is contained in:
de4dot 2012-01-09 07:55:01 +01:00
parent 6a8a036687
commit 665a170b9b

View File

@ -97,6 +97,7 @@ namespace de4dot.code.deobfuscators {
var arrayType = getArrayType(data.LongLength);
var attrs = FieldAttributes.Assembly | FieldAttributes.Static;
var field = new FieldDefinition(string.Format("field_{0}", unique++), attrs, arrayType);
field.Attributes |= FieldAttributes.HasFieldRVA;
field.MetadataToken = DotNetUtils.nextFieldToken();
ourType.Fields.Add(field);
var iv = new byte[data.Length];