mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd::gpt::vocab: Simplify overflow truncation length.
This commit is contained in:
parent
18df9bd2da
commit
366289823e
1 changed files with 1 additions and 1 deletions
|
@ -394,7 +394,7 @@ ircd::gpt::vocab::pre_tokenize(u8x16 (&token)[16],
|
||||||
// from the input, but the truncation is determined after a transform
|
// from the input, but the truncation is determined after a transform
|
||||||
// which may have a different size; this has to be offset back now.
|
// which may have a different size; this has to be offset back now.
|
||||||
if(ret[1] + off > 16)
|
if(ret[1] + off > 16)
|
||||||
len -= (ret[1] + off) - 16;
|
len = 16;
|
||||||
|
|
||||||
// Pack the utf-8 codepoints into the result token
|
// Pack the utf-8 codepoints into the result token
|
||||||
token[i] = u8x16{0};
|
token[i] = u8x16{0};
|
||||||
|
|
Loading…
Reference in a new issue