aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--redist/json_helpers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/redist/json_helpers.c b/redist/json_helpers.c
index 74028b2..fd04203 100644
--- a/redist/json_helpers.c
+++ b/redist/json_helpers.c
@@ -23,7 +23,7 @@ void json_write_float_array(FILE* f, const char* tag, float* v, uint8_t count) {
str1=str2;
str2=NULL;
}
- asprintf(&str2, "%s]", str1,v[i]);
+ asprintf(&str2, "%s]", str1);
fputs(str2,f);
free(str1);
free(str2);
@@ -45,7 +45,7 @@ void json_write_double_array(FILE* f, const char* tag, double* v, uint8_t count)
str1=str2;
str2=NULL;
}
- asprintf(&str2, "%s]", str1,v[i]);
+ asprintf(&str2, "%s]", str1);
fputs(str2,f);
free(str1);
free(str2);
@@ -61,4 +61,4 @@ void json_write_float(FILE* f, const char* tag, float v) {
void json_write_str(FILE* f, const char* tag, const char* v) {
fprintf(f, "\"%s\":\"%s\"", tag, v);
-} \ No newline at end of file
+}