Skip to content

Conversation

@amousset
Copy link
Contributor

@amousset amousset commented Feb 9, 2026

  • Allow ranges with a unique value. It looks to me like an expected behavior compared to other implementations of ranges (python, etc.). This should not be a compatibility problem as it would currently crash the agent.
  • Make invalid step a soft fail. I don't see a reason to stop the agent in case the value is invalid (but I may be missing something).

Rationale: This avoids some special case handling when computing ranges where the bounds are equal (or lower than the step), with a consistent interface.

if (step_size < 1)
{
FatalError(ctx, "EXPANDRANGE Step size cannot be less than 1 or greater than the interval");
Log(LOG_LEVEL_ERR, "%s: Step size cannot be less than 1", fp->name);

Check notice

Code scanning / CodeQL

Pointer argument is dereferenced without checking for NULL Note

Parameter fp in FnCallExpandRange() is dereferenced without an explicit null-check
- Allow ranges with a unique value (as the range is already inclusive)
- Make invalid step value a soft fail

Changelog: Allow expandrange to output a single value
@amousset amousset force-pushed the allow-single-element-range branch from db2ba4d to de9375b Compare February 9, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant