Enable InitLocals to make peverify happy

This commit is contained in:
Stefanos A. 2013-11-27 09:16:23 +01:00
parent e48a624003
commit fb99c7d7a1

View file

@ -324,6 +324,12 @@ namespace OpenTK.Rewrite
// return
il.Emit(OpCodes.Ret);
if (body.Variables.Count > 0)
{
// Required for verifiable executables
// (otherwise peverify complains bitterly)
body.InitLocals = true;
}
body.OptimizeMacros();
}