Merge branch 'justincc-master'

This commit is contained in:
Justin Clark-Casey (justincc)
2014-01-11 01:22:42 +00:00
2 changed files with 4 additions and 2 deletions

View File

@@ -2072,8 +2072,10 @@ namespace OpenSim.Framework
#region Xml Serialization Utilities
public static bool ReadBoolean(XmlTextReader reader)
{
// AuroraSim uses "int" for some fields that are boolean in OpenSim, e.g. "PassCollisions". Don't fail because of this.
reader.ReadStartElement();
bool result = Boolean.Parse(reader.ReadContentAsString().ToLower());
string val = reader.ReadContentAsString().ToLower();
bool result = val.Equals("true") || val.Equals("1");
reader.ReadEndElement();
return result;