summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2017-12-25 15:13:14 +0800
committerPeng Wu <alexepico@gmail.com>2017-12-25 15:13:14 +0800
commit8b618b16fd4cead026fdc48177d6e31fbce5fc49 (patch)
treec671e1d2bc30609ed6f9e83c31c111a7b2ca412b
parentd4a34f42b9e7c877e7d268b0d2a3b336da5e138c (diff)
downloadlibpinyin-8b618b16fd4cead026fdc48177d6e31fbce5fc49.zip
libpinyin-8b618b16fd4cead026fdc48177d6e31fbce5fc49.tar.gz
libpinyin-8b618b16fd4cead026fdc48177d6e31fbce5fc49.tar.xz
fixes get_candidates method
-rw-r--r--src/lookup/phonetic_lookup.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lookup/phonetic_lookup.h b/src/lookup/phonetic_lookup.h
index 845bf90..96cb7cf 100644
--- a/src/lookup/phonetic_lookup.h
+++ b/src/lookup/phonetic_lookup.h
@@ -286,7 +286,7 @@ public:
node->number();
const trellis_value_t * value = node->begin();
- for (gint32 j = 0; j < node->length(); ++j) {
+ for (; value < node->end(); ++value) {
g_ptr_array_add(candidates, (trellis_value_t *)value);
}
}