diff options
author | Joshua Allen <axlecrusher@gmail.com> | 2017-02-27 22:00:35 -0500 |
---|---|---|
committer | Joshua Allen <axlecrusher@gmail.com> | 2017-02-27 22:00:35 -0500 |
commit | b0dc9c89146d2a5904a4ecc6b9c1f8d1c5fcfce0 (patch) | |
tree | cd7639fa0bffd45803e15f770d7e78019608199d /src/survive_config.c | |
parent | 77644ff26ee7b8fcef3997d0ffe183d0a80c85e4 (diff) | |
download | libsurvive-b0dc9c89146d2a5904a4ecc6b9c1f8d1c5fcfce0.tar.gz libsurvive-b0dc9c89146d2a5904a4ecc6b9c1f8d1c5fcfce0.tar.bz2 |
check for correct float size
Diffstat (limited to 'src/survive_config.c')
-rw-r--r-- | src/survive_config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/survive_config.c b/src/survive_config.c index 2ed265b..5531006 100644 --- a/src/survive_config.c +++ b/src/survive_config.c @@ -168,7 +168,11 @@ const FLT* config_set_float_a(config_group *cg, const char *tag, const FLT* valu } void _json_write_float_array(FILE* f, const char* tag, FLT* v, uint8_t count) { - json_write_double_array(f,tag,v,count); + if (sizeof(FLT) == sizeof(double)) { + json_write_double_array(f,tag,v,count); + } else if (sizeof(FLT) == sizeof(float)) { + json_write_double_array(f,tag,v,count); + } } void write_config_group(FILE* f, config_group *cg, char *tag) { |