Made enum deserialization case insensitive

This commit is contained in:
Joonas Rikkonen
2017-11-16 21:00:42 +02:00
parent 08cf902cb8
commit d13d3101ea

View File

@@ -123,7 +123,7 @@ namespace Barotrauma
object enumVal;
try
{
enumVal = Enum.Parse(propertyInfo.PropertyType, value);
enumVal = Enum.Parse(propertyInfo.PropertyType, value, true);
}
catch (Exception e)
{
@@ -197,7 +197,7 @@ namespace Barotrauma
object enumVal;
try
{
enumVal = Enum.Parse(propertyInfo.PropertyType, value.ToString());
enumVal = Enum.Parse(propertyInfo.PropertyType, value.ToString(), true);
}
catch (Exception e)
{