From 7da8b814d53c389849cfb5a8c9884afcd4215eac Mon Sep 17 00:00:00 2001 From: JSDurand Date: Wed, 19 Jul 2023 13:47:28 +0800 Subject: genins: Fix the bug of forgetting to set ending positions. Previously a virtual fragment did not receive proper ending positions. This is now fixed. Additionally, after this fix, the function `set_pos` is only called with the last parameter set to `t`. Maybe I shall remove this parameter. --- chain/src/item/genins.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/src/item/genins.rs b/chain/src/item/genins.rs index 1996545..0de7198 100644 --- a/chain/src/item/genins.rs +++ b/chain/src/item/genins.rs @@ -335,7 +335,7 @@ impl DefaultForest> { if let Some(frag) = virtual_frag { let mut frag = (*frag.get(0).unwrap()).clone(); - frag.set_pos(atom, node_label.label().start(), false)?; + frag.set_pos(atom, node_label.label().start(), true)?; let frag_nodes_len = frag.nodes_len(); -- cgit v1.2.3-18-g5258