Skip to content

Commit

Permalink
Fix splitting multi-byte characters when enforcing FTS_FLATCURVE_MAX_…
Browse files Browse the repository at this point in the history
…TERM_SIZE
  • Loading branch information
edieterich committed Jun 21, 2024
1 parent 14b18e9 commit 2fe0adc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fts-backend-flatcurve.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ fts_backend_flatcurve_update_build_more(struct fts_backend_update_context *_ctx,

/* Xapian has a hard limit of "245 bytes", at least with the glass
* and chert backends. */
size = I_MIN(size, FTS_FLATCURVE_MAX_TERM_SIZE);
(void)uni_utf8_partial_strlen_n(data, I_MIN(size, FTS_FLATCURVE_MAX_TERM_SIZE), &size);

switch (ctx->type) {
case FTS_BACKEND_BUILD_KEY_HDR:
Expand Down

0 comments on commit 2fe0adc

Please sign in to comment.