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
Please register or sign in to comment