Skip to content

Commit

Permalink
fix(regexp): substraction overflow when incorrectly speicifying `star…
Browse files Browse the repository at this point in the history
…t` (#12325)
  • Loading branch information
xzhseh authored Sep 15, 2023
1 parent a566cfe commit 41ebb2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/expr/src/vector_op/regexp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ fn regexp_count_start0(text: &str, regex: &RegexpContext) -> Result<i32> {
fn regexp_count(text: &str, start: i32, regex: &RegexpContext) -> Result<i32> {
// First get the start position to count for
let start = match start {
..0 => {
..=0 => {
return Err(ExprError::InvalidParam {
name: "start",
reason: start.to_string().into(),
Expand Down Expand Up @@ -257,7 +257,7 @@ fn regexp_replace(
) -> Result<Box<str>> {
// The start position to begin the search
let start = match start {
..0 => {
..=0 => {
return Err(ExprError::InvalidParam {
name: "start",
reason: start.to_string().into(),
Expand Down

0 comments on commit 41ebb2a

Please sign in to comment.