diff options
-rw-r--r-- | string_utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/string_utils.c b/string_utils.c index 363b865..c0e34ef 100644 --- a/string_utils.c +++ b/string_utils.c @@ -44,7 +44,7 @@ void String_Parameter_To_Text(float Float_To_Convert,int Int_To_Convert, int sig { // FIXME - crappy string func char out_val[LCD_col_width+1]; - char floating_val[32]; + gchar *floating_val = NULL; char String_of_spaces[LCD_col_width+1]; char unit_mult[10]; /* units multiplier, eg. M, k, u */ @@ -67,7 +67,7 @@ void String_Parameter_To_Text(float Float_To_Convert,int Int_To_Convert, int sig sprintf(out_val, "%d", (int) Float_To_Convert); strcat(LCD_string,out_val); } else { - Float_To_Text(remote_digits_after_decimal,Float_To_Convert,floating_val); + Float_To_Text(remote_digits_after_decimal,Float_To_Convert,&floating_val); /* -- COPY FIRST ONE OR TWO CHARACTERS -- */ if (floating_val[0]=='-') { /* if it's negative ... */ @@ -158,5 +158,7 @@ void String_Parameter_To_Text(float Float_To_Convert,int Int_To_Convert, int sig } strcat(LCD_string,units); + + g_free (floating_val); } |