From 25d938f3e60d5daf01c1e79088591e83eb6454f4 Mon Sep 17 00:00:00 2001 From: shzhulin3 Date: Thu, 17 Jun 2021 16:48:55 +0800 Subject: [PATCH] fix vec --- src/comm/segment/bmm_segment.cc | 4 ++-- src/comm/segment/custom_segment.cc | 3 +++ src/comm/segment/fmm_segment.cc | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/comm/segment/bmm_segment.cc b/src/comm/segment/bmm_segment.cc index 16a302c..5fbdf25 100644 --- a/src/comm/segment/bmm_segment.cc +++ b/src/comm/segment/bmm_segment.cc @@ -25,15 +25,15 @@ void BmmSegment::ConcreteSplit(iutf8string& phrase, uint32_t appid, vector::iterator iter = bmm_list.begin(); bmm_list.insert(iter, key.stlstring()); - i -= key.length() - 1; + i -= key.length(); break; } } if (j == phrase_sub.length() - 1) { vector::iterator iter = bmm_list.begin(); bmm_list.insert(iter, "" + phrase_sub[j]); + i--; } - i -= 1; } return; } \ No newline at end of file diff --git a/src/comm/segment/custom_segment.cc b/src/comm/segment/custom_segment.cc index 7187f02..8363933 100644 --- a/src/comm/segment/custom_segment.cc +++ b/src/comm/segment/custom_segment.cc @@ -56,4 +56,7 @@ void CustomSegment::ConcreteSplit(iutf8string& phrase, uint32_t appid, vector