Skip to content

Commit

Permalink
[#2] Circular references deserialization fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
artema committed Oct 6, 2013
1 parent e589281 commit eee5640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/DotAmf/Decoder/Amf3Decoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -612,10 +612,10 @@ private void ReadArray(AmfContext context, AmfStreamReader reader, XmlWriter out
private void ReadObject(AmfContext context, AmfStreamReader reader, XmlWriter output = null)
{
var reference = reader.PeekChar();
int index;

if ((reference & 0x1) == 0)
if ((reference & 0x1) == 0 && ReadReference(context, reader, out index, out reference))
{
var index = reference >> 1;
if (output != null) WriteReference(index, output);
return;
}
Expand Down

0 comments on commit eee5640

Please sign in to comment.