- const int currentIndex = arg[ARGINDEX_STEP_INDEX];
- const int numSteps = arg[ARGINDEX_LIST_SIZE];
- const float first = arg[ARGINDEX_LIST_START];
- const float last = arg[ARGINDEX_LIST_START + (numSteps - 1)];
- const bool ascending = (last > first) ? true : false;
- int newIndex = currentIndex;
+ const int32_t currentIndex = static_cast<int32_t>(arg[ARGINDEX_STEP_INDEX]); // truncated
+ const int32_t numSteps = static_cast<int32_t>(arg[ARGINDEX_LIST_SIZE]); // truncated
+ const float first = arg[ARGINDEX_LIST_START];
+ const float last = arg[ARGINDEX_LIST_START + (numSteps - 1)];
+ const bool ascending = (last > first) ? true : false;
+ int32_t newIndex = currentIndex;