Mercurial > public > mk2
diff 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 |
line wrap: on
line diff
--- a/code_part1/OSTC_code_c_part2/p2_deco.c Thu Feb 24 23:22:32 2011 +0100 +++ b/code_part1/OSTC_code_c_part2/p2_deco.c Sat Feb 26 17:53:43 2011 +0100 @@ -2169,7 +2169,7 @@ void deco_calc_percentage(void) { RESET_C_STACK - int_I_temp = (short)(int_I_temp * (char_I_temp / 100.0)); + int_I_temp = (unsigned short)(((float)int_I_temp * (float)char_I_temp) / 100.0); } //////////////////////////////////////////////////////////////////////////////