Skip to content
Commit 2b096066 authored by Julian Helfferich's avatar Julian Helfferich
Browse files

Fix Coverty #76265: Make check for array bounds explicit

Before, the function KBlocksField::getCell() checked that the variable
cx was in bounds, i.e. larger than zero and smaller than the width of
the play field. The check that cx is in bounds is important as it is
used to index an array.

Now, the check is done explicitely in KBlocksAIPlanner::process. It is
good practice not to rely too much on a subfunction.
parent 8e1227d4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment