Fix possibility of test rulesets being discovered from assemblies

This commit is contained in:
smoogipoo
2018-05-14 19:39:23 +09:00
parent f0b7ed238c
commit 47cf4f27fb
5 changed files with 13 additions and 13 deletions

View File

@ -112,7 +112,7 @@ namespace osu.Game.Rulesets
try
{
var assembly = Assembly.LoadFrom(file);
loaded_assemblies[assembly] = assembly.GetTypes().First(t => t.IsSubclassOf(typeof(Ruleset)));
loaded_assemblies[assembly] = assembly.GetTypes().First(t => t.IsPublic && t.IsSubclassOf(typeof(Ruleset)));
}
catch (Exception)
{