HomeFreeBSD

games/openbor: fix off-by-one noticed by gcc6

Description

games/openbor: fix off-by-one noticed by gcc6

openbor.c: In function 'common_dot':
openbor.c:20485:39: warning: iteration 10 invokes undefined behavior [-Waggressive-loop-optimizations]

iDot_time   =   self->dot_time[iIndex]; //Get expire time.
                ~~~~~~~~~~~~~~^~~~~~~~

openbor.c:20483:5: note: within this loop

for(iIndex = 0; iIndex <= MAX_DOTS; iIndex++) //Loop through all DOT indexes.
^~~

Details

Provenance
jbeichAuthored on
Parents
rP428969: - Update to 3.10.0
Branches
Unknown
Tags
Unknown