Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix max init value in functions to 1 (#36686)
- Changed the initial value of max to 1 within the function. - If max is not updated during the for loop, it returns -1, which can cause an INTEGER_OVERFLOW - By initializing max to 1, it ensures that if max is updated during the loop, the updated value is used. - If no value is updated, it performs the -1 operation and updates to 0.
- Loading branch information