Unverified Commit c13b9d87 authored by OlivierDehaene's avatar OlivierDehaene Committed by GitHub
Browse files

fix(router): fix truncation (#190)

closes #189
parent 7a1ba585
...@@ -308,8 +308,8 @@ fn prepare_input( ...@@ -308,8 +308,8 @@ fn prepare_input(
// Optionally truncate // Optionally truncate
let (inputs, input_length) = match truncate { let (inputs, input_length) = match truncate {
// Truncate is some and > encoding length // Truncate is some and < encoding length
Some(truncate) if truncate > encoding.len() => { Some(truncate) if truncate < encoding.len() => {
// truncate encoding and decode new inputs // truncate encoding and decode new inputs
encoding.truncate(truncate, 0, TruncationDirection::Left); encoding.truncate(truncate, 0, TruncationDirection::Left);
let inputs = tokenizer let inputs = tokenizer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment