Mercurial > public > mk2
comparison code_part1/OSTC_code_c_part2/p2_deco.c @ 218:f4b79292e31f
BUGFIX NoFly time
Bug in char-to-float promotion ???
author | JeanDo |
---|---|
date | Sat, 26 Feb 2011 17:53:43 +0100 |
parents | ce6f16711567 |
children | 638f8e17bd51 |
comparison
equal
deleted
inserted
replaced
217:ce6f16711567 | 218:f4b79292e31f |
---|---|
2167 // Used to compute NoFly remaining time. | 2167 // Used to compute NoFly remaining time. |
2168 | 2168 |
2169 void deco_calc_percentage(void) | 2169 void deco_calc_percentage(void) |
2170 { | 2170 { |
2171 RESET_C_STACK | 2171 RESET_C_STACK |
2172 int_I_temp = (short)(int_I_temp * (char_I_temp / 100.0)); | 2172 int_I_temp = (unsigned short)(((float)int_I_temp * (float)char_I_temp) / 100.0); |
2173 } | 2173 } |
2174 | 2174 |
2175 ////////////////////////////////////////////////////////////////////////////// | 2175 ////////////////////////////////////////////////////////////////////////////// |
2176 | 2176 |
2177 void deco_push_tissues_to_vault(void) | 2177 void deco_push_tissues_to_vault(void) |