Skip to content
  • Julian Helfferich's avatar
    Fix Coverty #76265: Make check for array bounds explicit · 2b096066
    Julian Helfferich authored
    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.
    2b096066