You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SliceFilter::doFilter tries splits the input into parts left and right from the ":" that divides the range to output.
auto splitterIndex = argString.get().indexOf(QLatin1Char(':'));
QString inputString = getSafeString(input);
if (splitterIndex >= 0) {
auto left = argString.get().left(splitterIndex).get().toInt();
auto right = argString.get().right(splitterIndex).get().toInt();
But the right hand part is not correctly extracted, because QString::right expects the amount of characters from the right. It seems the code should be using QString::mid with the correct index adjustments instead.
Test cases: data|slice:"0:10" returns the empty string, because it uses only "0" as right side. data|slice:"00:-1" works because because "00" and "-1" are the same lenght.
The text was updated successfully, but these errors were encountered:
SliceFilter::doFilter tries splits the input into parts left and right from the ":" that divides the range to output.
But the right hand part is not correctly extracted, because QString::right expects the amount of characters from the right. It seems the code should be using
QString::mid
with the correct index adjustments instead.Test cases:
data|slice:"0:10"
returns the empty string, because it uses only "0" as right side.data|slice:"00:-1"
works because because "00" and "-1" are the same lenght.The text was updated successfully, but these errors were encountered: