Skip to content

Commit

Permalink
fix build warning
Browse files Browse the repository at this point in the history
  • Loading branch information
js8544 committed Dec 16, 2023
1 parent 6a2d89e commit 4f427a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/arrow/compute/kernels/scalar_string_ascii.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2590,7 +2590,8 @@ struct SliceBytesTransform : StringSliceTransformBase {
start = std::min(start, input_width);
stop = std::min(stop, input_width);

if ((start >= stop and step > 0) || (start <= stop and step < 0) || start == stop) {
if ((start == stop) || ((start >= stop) && (step > 0)) ||
((start <= stop) && (step < 0))) {
return 0;
}
return static_cast<int32_t>(std::max(
Expand Down

0 comments on commit 4f427a8

Please sign in to comment.