diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-30 11:51:33 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-08-30 11:51:33 -0400 |
commit | fd2b70b0808a8bce76825b38bcd625d1f0089fcb (patch) | |
tree | 6005320e2df6afadcd7968ae245fb6de88b22d5c /string_utils.c | |
parent | 8f1eb077e1ad3c176b3399392edfd109c75551b4 (diff) |
fix invocation of Float_to_Text
Diffstat (limited to 'string_utils.c')
-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); } |