Hack around invalid PI declaration that Linden Lab sends and XmlReader refuses to parse

This commit is contained in:
Cinder
2021-09-14 09:52:24 -05:00
parent 3c14a46402
commit 0dd41ce4c7
3 changed files with 67 additions and 16 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2006-2016, openmetaverse.co
* Copyright (c) 2021, Sjofn LLC.
* All rights reserved.
*
* - Redistribution and use in source and binary forms, with or without
@@ -1246,7 +1247,7 @@ namespace OpenMetaverse.StructuredData
public static OSD Deserialize(Stream stream)
{
if (!stream.CanSeek) throw new OSDException("Cannot deserialize structured data from unseekable streams");
if (!stream.CanSeek) { throw new OSDException("Cannot deserialize structured data from unseekable streams"); }
byte[] headerData = new byte[14];
stream.Read(headerData, 0, 14);