This commit is contained in:
cinder
2022-10-10 16:08:14 -05:00
parent 2a9e17163e
commit 7875acf84c
6 changed files with 271 additions and 232 deletions

View File

@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Xml;
using System.Text;
@@ -48,15 +49,7 @@ namespace OpenMetaverse.StructuredData
public static OSD DeserializeLLSDXml(Stream xmlStream)
{
// XmlReader don't take no shit from nobody. Parse out Linden Lab's bad PI.
bool match = true;
for (int i = 0; i < linden_lab_loves_bad_pi.Length; ++i)
{
if (xmlStream.ReadByte() != linden_lab_loves_bad_pi[i])
{
match = false;
break;
}
}
bool match = linden_lab_loves_bad_pi.All(t => xmlStream.ReadByte() == t);
if (match)
{
// read until the linebreak >