* Fixed a bug in BitPack where existing 1 bits were not being overwritten by new 0 bits
* Added BitPack.PackBit() * Made Binary LLSD deserialization more lenient when parsing the header. Tests pass again git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3364 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -53,7 +53,8 @@ namespace OpenMetaverse.StructuredData
|
||||
private const int int32Length = 4;
|
||||
private const int doubleLength = 8;
|
||||
|
||||
private const string llsdBinaryHead = "<? llsd/binary ?>\n";
|
||||
private const string llsdBinaryHead = "<? llsd/binary ?>";
|
||||
private const string llsdBinaryHead2 = "<?llsd/binary?>";
|
||||
private const byte undefBinaryValue = (byte)'!';
|
||||
private const byte trueBinaryValue = (byte)'1';
|
||||
private const byte falseBinaryValue = (byte)'0';
|
||||
@@ -98,10 +99,11 @@ namespace OpenMetaverse.StructuredData
|
||||
|
||||
SkipWhiteSpace(stream);
|
||||
|
||||
bool result = FindString(stream, llsdBinaryHead);
|
||||
if (!result)
|
||||
if (!FindString(stream, llsdBinaryHead) && !FindString(stream, llsdBinaryHead2))
|
||||
throw new OSDException("Failed to decode binary LLSD");
|
||||
|
||||
SkipWhiteSpace(stream);
|
||||
|
||||
return ParseLLSDBinaryElement(stream);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user