Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
fix assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Dronplane committed Jan 17, 2022
1 parent 5182906 commit 38db10d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions core/analysis/collation_token_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,8 @@ bool collation_token_stream::reset(const string_ref& data) {
// according to ICU docs sort keys are always zero-terminated,
// there is no reason to store terminal zero in term dictionary
assert(term_size > 0);

assert(0 == buf[term_size]);

--term_size;
assert(0 == buf[term_size]);
if (term_size > static_cast<int32_t>(sizeof raw_term_buf)) {
IR_FRMT_ERROR(
"Collated token is %d bytes length which exceeds maximum allowed length of %d bytes",
Expand Down

0 comments on commit 38db10d

Please sign in to comment.