aboutsummaryrefslogtreecommitdiff
path: root/src/survive_config.c
diff options
context:
space:
mode:
authorCNLohr <charles@cnlohr.com>2017-03-16 15:30:21 -0400
committerGitHub <noreply@github.com>2017-03-16 15:30:21 -0400
commitd9412e4252c176583b5b737608acb4e60d47c00a (patch)
treec339acbb982d1f2d67977be98a4ae7cac85f8057 /src/survive_config.c
parent6daf2506fcfbfcd26d63a8bddba319d67ecc33e5 (diff)
parentccaa625c6161e14f5c2281cc43134d1928094620 (diff)
downloadlibsurvive-d9412e4252c176583b5b737608acb4e60d47c00a.tar.gz
libsurvive-d9412e4252c176583b5b737608acb4e60d47c00a.tar.bz2
Merge pull request #37 from mwturvey/WinSupport2
VS2017 CE Support
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];