diff options
-rw-r--r-- | machine/fp_emulation.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/machine/fp_emulation.c b/machine/fp_emulation.c index ffa431b..c83ef73 100644 --- a/machine/fp_emulation.c +++ b/machine/fp_emulation.c @@ -201,7 +201,7 @@ DECLARE_EMULATION_FUNC(emulate_fcvt_fi) { case 0: // int32 negative = (int32_t)uint_val < 0; - uint_val = negative ? -(int32_t)uint_val : (int32_t)uint_val; + uint_val = (uint32_t)(negative ? -uint_val : uint_val); break; case 1: // uint32 uint_val = (uint32_t)uint_val; |