We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2999432 commit 52cab39Copy full SHA for 52cab39
dsc_lib/src/functions/index_of.rs
@@ -48,7 +48,10 @@ impl Function for IndexOf {
48
};
49
50
if matches {
51
- return Ok(Value::Number((index as i64).into()));
+ let index_i64 = i64::try_from(index).map_err(|_| {
52
+ DscError::Parser("Array index too large to represent as integer".to_string())
53
+ })?;
54
+ return Ok(Value::Number(index_i64.into()));
55
}
56
57
0 commit comments