Skip to content

Commit

Permalink
oob check
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayan Shaw committed Jan 16, 2025
1 parent 7540330 commit 921562a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion operators/tokenizer/bpe_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ class PreTokenizerWithRegEx {
}

void CategoryMatch(size_t& index, std::set<ufal::unilib::unicode::category_t>& categories){
while (categories.find(ufal::unilib::unicode::category(m_text[index])) != categories.end()){
while (index < m_text.size() && categories.find(ufal::unilib::unicode::category(m_text[index])) != categories.end()){
index++;
}
}
Expand Down

0 comments on commit 921562a

Please sign in to comment.