Composition of the trailing sequence fixed
This commit is contained in:
parent
38639a8716
commit
ee1f85ff27
@ -82,7 +82,7 @@ static inline void Compose(
|
|||||||
|
|
||||||
if (l >= r) {
|
if (l >= r) {
|
||||||
// The search area is empty.
|
// The search area is empty.
|
||||||
if (j && wcslen(compositions[l_prev].src) == j) {
|
if (j && l_prev < compositionsCount && compositions[l_prev].src[j] == 0) {
|
||||||
// The first composition of the previous run was a match.
|
// The first composition of the previous run was a match.
|
||||||
output += compositions[l_prev].dst;
|
output += compositions[l_prev].dst;
|
||||||
i = ii;
|
i = ii;
|
||||||
@ -100,7 +100,7 @@ static inline void Compose(
|
|||||||
} else {
|
} else {
|
||||||
// End of input reached.
|
// End of input reached.
|
||||||
|
|
||||||
if (l && wcslen(compositions[l - 1].src) == j) {
|
if (l < compositionsCount && compositions[l].src[j] == 0) {
|
||||||
// The first composition of the previous run was a match.
|
// The first composition of the previous run was a match.
|
||||||
output += compositions[l].dst;
|
output += compositions[l].dst;
|
||||||
i = ii;
|
i = ii;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user