Clang static analysis reports an 'Assigned value is garbage or undefined' for this. If no points were read from the file, the `n_points` variable is 0 and `env_x[n_points-1]` performs an out-of-bounds access.master
n_points++; | n_points++; | ||||
} | } | ||||
} | } | ||||
env_x[n_points] = env_x[n_points-1]; | |||||
env_y[n_points] = env_y[n_points-1]; | |||||
if (n_points > 0) { | |||||
env_x[n_points] = env_x[n_points-1]; | |||||
env_y[n_points] = env_y[n_points-1]; | |||||
} | |||||
ix = -1; | ix = -1; | ||||
ix2 = 0; | ix2 = 0; |