diff options
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Util.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index e8dfec1..52635b2 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -2029,8 +2029,10 @@ namespace OpenSim.Framework | |||
2029 | #region Xml Serialization Utilities | 2029 | #region Xml Serialization Utilities |
2030 | public static bool ReadBoolean(XmlTextReader reader) | 2030 | public static bool ReadBoolean(XmlTextReader reader) |
2031 | { | 2031 | { |
2032 | // AuroraSim uses "int" for some fields that are boolean in OpenSim, e.g. "PassCollisions". Don't fail because of this. | ||
2032 | reader.ReadStartElement(); | 2033 | reader.ReadStartElement(); |
2033 | bool result = Boolean.Parse(reader.ReadContentAsString().ToLower()); | 2034 | string val = reader.ReadContentAsString().ToLower(); |
2035 | bool result = val.Equals("true") || val.Equals("1"); | ||
2034 | reader.ReadEndElement(); | 2036 | reader.ReadEndElement(); |
2035 | 2037 | ||
2036 | return result; | 2038 | return result; |