Spot the bug in the four-element total

from C-style arrays
C++23 (GCC 13.3.0) beginner 4 min 1 issue to find

Find the bounds error in this function, which should total exactly four elements.

C++
int total_four(const int (&values)[4]) {
    int total = 0;
    for (int index = 0; index <= 4; ++index) {
        total += values[index];
    }
    return total;
}
Open in playground
Report an error