Fixed crash in iterator Clone(), added test
This commit is contained in:
parent
a5aca090c1
commit
1ddc94c2e5
2 changed files with 14 additions and 1 deletions
|
|
@ -190,7 +190,10 @@ func (it *Iterator) Clone() graph.Iterator {
|
|||
m.tags.CopyFrom(it)
|
||||
return m
|
||||
}
|
||||
m := NewIterator(it.qs, it.kind, it.dir, it.hash)
|
||||
|
||||
// Create a token, the tokens kind is ignored in creation of the iterator
|
||||
t := &Token{nodeKind, it.hash}
|
||||
m := NewIterator(it.qs, it.kind, it.dir, t)
|
||||
m.tags.CopyFrom(it)
|
||||
return m
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue