refs #54 Fixed .NET 2.0 compatibility issue
The runtime of the constants protection is now .NET Framework 2.0 compatible.
This commit is contained in:
Родитель
410d433931
Коммит
76e245068d
|
@ -41,7 +41,9 @@ namespace Confuser.Runtime {
|
||||||
}
|
}
|
||||||
|
|
||||||
static T Get<T>(uint id) {
|
static T Get<T>(uint id) {
|
||||||
if (Assembly.GetExecutingAssembly() == Assembly.GetCallingAssembly()) {
|
// op_equality is not available on .NET Framework 2.0 and older. To ensure compatibility,
|
||||||
|
// we'll be using equals.
|
||||||
|
if (Assembly.GetExecutingAssembly().Equals(Assembly.GetCallingAssembly())) {
|
||||||
id = (uint)Mutation.Placeholder((int)id);
|
id = (uint)Mutation.Placeholder((int)id);
|
||||||
uint t = id >> 30;
|
uint t = id >> 30;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче