aboutsummaryrefslogtreecommitdiff
path: root/src/survive_config.c
diff options
context:
space:
mode:
authormwturvey <michael.w.turvey@intel.com>2017-03-15 11:38:22 -0700
committermwturvey <michael.w.turvey@intel.com>2017-03-15 11:38:22 -0700
commit1caa844dad647b03cf3c1d11bf211e9fcde4b7f1 (patch)
tree5f5d7d8cb03b365390fc733f1eb677bb343725a1 /src/survive_config.c
parent8d4c581a6fb0c69883db7c1c5fe2820d53ccab13 (diff)
downloadlibsurvive-1caa844dad647b03cf3c1d11bf211e9fcde4b7f1.tar.gz
libsurvive-1caa844dad647b03cf3c1d11bf211e9fcde4b7f1.tar.bz2
Windows Compiling
Diffstat (limited to 'src/survive_config.c')
-rw-r--r--src/survive_config.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/survive_config.c b/src/survive_config.c
index 10da9a6..7435cc4 100644
--- a/src/survive_config.c
+++ b/src/survive_config.c
@@ -3,7 +3,7 @@
#include <assert.h>
#include "survive_config.h"
#include <json_helpers.h>
-
+#include <malloc.h> //for alloca
#include <errno.h>
//#define MAX_CONFIG_ENTRIES 100
@@ -293,7 +293,8 @@ void pop_config_group() {
int parse_floats(char* tag, char** values, uint16_t count) {
uint16_t i = 0;
- FLT f[count];
+ FLT *f;
+ f = alloca(sizeof(FLT) * count);
char* end = NULL;
config_group* cg = cg_stack[cg_stack_head];
@@ -321,7 +322,8 @@ int parse_floats(char* tag, char** values, uint16_t count) {
int parse_uint32(char* tag, char** values, uint16_t count) {
uint16_t i = 0;
- uint32_t l[count];
+ FLT *l;
+ l = alloca(sizeof(FLT) * count);
char* end = NULL;
config_group* cg = cg_stack[cg_stack_head];