Add missing test for off the end

git-svn-id: https://cld2.googlecode.com/svn/trunk@72 b252ecd4-b096-bf77-eb8e-91563289f87e
This commit is contained in:
dsites@google.com
2013-08-24 19:04:42 +00:00
parent 5afb32e97e
commit dfbaac9bcc

View File

@@ -968,6 +968,7 @@ bool ScriptScanner::GetOneScriptSpan(LangSpan* span) {
tlen = ScanToLetterOrSpecial(next_byte_ + take, byte_length_ - take);
take += tlen;
map2original_.Delete(tlen);
if (take >= byte_length_) {break;} // Might have scanned to end
// We are at a letter, nonletter, tag, or entity
if (IsSpecial(next_byte_[take]) && !is_plain_text_) {