Fixed problem with dictinary

This commit is contained in:
yhirose 2020-02-25 11:34:04 -05:00
parent e7d05e4ce6
commit 1b19b98cf5

View File

@ -433,7 +433,7 @@ public:
{ {
auto done = false; auto done = false;
size_t len = 1; size_t len = 1;
while (!done) { while (!done && len <= text_len) {
std::string s(text, len); std::string s(text, len);
auto it = dic_.find(s); auto it = dic_.find(s);
if (it == dic_.end()) { if (it == dic_.end()) {