Mercurial > public > hwos_code
diff src/p2_deco.c @ 597:66334c6adcf6
BUGFIX: "lost gas" was re-activated in rare cases
author | heinrichsweikamp |
---|---|
date | Sun, 08 Jul 2018 12:22:20 +0200 |
parents | 1719de53e497 |
children | ab88a7e3de94 |
line wrap: on
line diff
--- a/src/p2_deco.c Tue Jul 03 09:49:34 2018 +0200 +++ b/src/p2_deco.c Sun Jul 08 12:22:20 2018 +0200 @@ -2698,6 +2698,7 @@ { internal_deco_time [x] = 0; internal_deco_depth[x] = 0; + internal_deco_gas[x] = 0; } // clear stop table overflow warning @@ -3540,7 +3541,10 @@ // get the next gas stop_gas = internal_deco_gas[i]; - + + // in case of end-of-table, keep the last gas + if( !stop_gas ) stop_gas = stop_gas_last; + // do we we have a gas change? if( stop_gas_last && (stop_gas != stop_gas_last) ) {