Skip to content

Commit

Permalink
Remove incorrect modification of depth parameter
Browse files Browse the repository at this point in the history
Decrementing `depth` makes no sense here and causes nested PSObject instances with more than one property to generate invalid xml
  • Loading branch information
IISResetMe committed Dec 9, 2018
1 parent b7b386d commit 56e07a0
Showing 1 changed file with 0 additions and 2 deletions.
Expand Up @@ -731,8 +731,6 @@ private void WritePSObjectProperties(PSObject source, int depth)

depth = GetDepthOfSerialization(source, depth);

//Depth available for each property is one less
--depth;
Dbg.Assert(depth >= 0, "depth should be greater or equal to zero");
if (source.GetSerializationMethod(null) == SerializationMethod.SpecificProperties)
{
Expand Down

0 comments on commit 56e07a0

Please sign in to comment.