summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decoder/hg_intersect.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/decoder/hg_intersect.cc b/decoder/hg_intersect.cc
index 81350cb0..8752838f 100644
--- a/decoder/hg_intersect.cc
+++ b/decoder/hg_intersect.cc
@@ -127,7 +127,8 @@ bool HG::Intersect(const Lattice& target, Hypergraph* hg) {
if (cur > 0) {
f[j] = cur;
} else {
- tn[ntc++] = cur;
+ tn[-cur] = -ntc;
+ ++ntc;
f[j] = cats[edge.tail_nodes_[-cur]];
}
}