diff --git a/src/cats/overlays/overlay_habitat_type_cc.c b/src/cats/overlays/overlay_habitat_type_cc.c index a349ef002bad33555acbf02a026d516ae165d72b..e98c258f98d2059292ecac0f7667e78c9d4697c2 100644 --- a/src/cats/overlays/overlay_habitat_type_cc.c +++ b/src/cats/overlays/overlay_habitat_type_cc.c @@ -107,8 +107,9 @@ double get_habitat_cc_multiplier(const struct habitat_layer_cc_aux *aux, int32_t aux->max_code); exit(EXIT_FAILURE); } - - return aux->habitat_multipliers[habitat_type]; + double result = aux->habitat_multipliers[habitat_type]; + assert(result >= 0.0); + return result; }