From f985de8a54f7ce20fa87c43ec6c40da93b002db2 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Wed, 23 Feb 2011 14:34:07 +0100 Subject: [PATCH] gcode_parse.c: make decfloat_to_int handle all uints. This saves 10 bytes of binary size and possible headaches (negative factors). --- gcode_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcode_parse.c b/gcode_parse.c index 17f9163..30d4e5c 100644 --- a/gcode_parse.c +++ b/gcode_parse.c @@ -73,7 +73,7 @@ GCODE_COMMAND next_target __attribute__ ((__section__ (".bss"))); extern const uint32_t powers[]; // defined in sermsg.c const int32_t rounding[DECFLOAT_EXP_MAX] = {0, 5, 50, 500}; -static int32_t decfloat_to_int(decfloat *df, int32_t multiplicand, uint32_t denominator) { +static int32_t decfloat_to_int(decfloat *df, uint32_t multiplicand, uint32_t denominator) { int32_t r = df->mantissa; uint8_t e = df->exponent;