[jit] Fix duplicated left-hand side in comparison
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 2 Mar 2016 20:01:27 +0000 (21:01 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 2 Mar 2016 20:01:27 +0000 (21:01 +0100)
The typo introduced by 1a784475c04a7b371e53346bee032590f4f94853 caused the if to always be false,
because it would compare like if (true == MONO_EXCEPTION_FIELD_ACCESS).

mono/mini/mini.c

index 2f611f4d93241f8266ca143f23e8a3095ac689c0..c58b0e138c1570d5df87aa24779f56d432ca477c 100644 (file)
@@ -1261,7 +1261,7 @@ mini_method_verify (MonoCompile *cfg, MonoMethod *method, gboolean fail_compile)
 
                                        if (info->exception_type == MONO_EXCEPTION_METHOD_ACCESS)
                                                mono_error_set_generic_error (&cfg->error, "System", "MethodAccessException", "%s", msg);
-                                       else if (info->exception_type == info->exception_type == MONO_EXCEPTION_FIELD_ACCESS)
+                                       else if (info->exception_type == MONO_EXCEPTION_FIELD_ACCESS)
                                                mono_error_set_generic_error (&cfg->error, "System", "FieldAccessException", "%s", msg);
                                        else if (info->exception_type == MONO_EXCEPTION_UNVERIFIABLE_IL)
                                                mono_error_set_generic_error (&cfg->error, "System.Security", "VerificationException", msg);