Mercurial > public > hwos_code
diff src/p2_deco.c @ 591:146e50d2672f
BUGFIX: handle two deco gases configured to the same change depth
author | heinrichsweikamp |
---|---|
date | Thu, 15 Mar 2018 20:43:38 +0100 |
parents | e81cf407261a |
children | 1719de53e497 |
line wrap: on
line diff
--- a/src/p2_deco.c Mon Mar 12 10:15:52 2018 +0100 +++ b/src/p2_deco.c Thu Mar 15 20:43:38 2018 +0100 @@ -1156,12 +1156,12 @@ // as 'first' because these have their change depth set to 0. if( sim_depth_limit > char_I_deco_gas_change[j] ) continue; - // Is the change depth of the gas deeper than the change depth of the + // Is the change depth of the gas deeper or equal than the change depth of the // gas we are currently one? // If yes, skip this gas as it is not better than the current one. // Remark: if there is more than one gas with the same change depth, // the last one from the list will be taken. - if( sim_gas_last_depth && (char_I_deco_gas_change[j] > sim_gas_last_depth) ) continue; + if( sim_gas_last_depth && (char_I_deco_gas_change[j] >= sim_gas_last_depth) ) continue; // Is the change depth of the gas shallower or equal to the change depth // of the best gas found so far, or is it the first better gas found?