We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbacd07 commit bc53fa6Copy full SHA for bc53fa6
codepulse/src/main/scala/com/secdec/codepulse/data/bytecode/CodeTree2.scala
@@ -78,8 +78,9 @@ trait CodeTreeNode {
78
childrenCondensed foreach { _.parent = None }
79
80
childrenCondensed match {
81
- case child :: Nil if child.kind == this.kind =>
+ case child :: Nil if child.kind == this.kind && parent.isDefined =>
82
// just return that child, and this node is effectively removed
83
+ // (only do this when there is a parent. if no parent, don't collapse this node away)
84
child
85
case list =>
86
// Note: children is a Set, so if the list suddenly has duplicates, some nodes will be lost.
0 commit comments