diff options
author | mwturvey <michael.w.turvey@intel.com> | 2017-03-16 10:52:13 -0700 |
---|---|---|
committer | mwturvey <michael.w.turvey@intel.com> | 2017-03-16 10:52:13 -0700 |
commit | ccaa625c6161e14f5c2281cc43134d1928094620 (patch) | |
tree | c339acbb982d1f2d67977be98a4ae7cac85f8057 /src/survive.c | |
parent | d9c9ebe6de1e6f255d645dd6e641f2c288238bc2 (diff) | |
parent | 6daf2506fcfbfcd26d63a8bddba319d67ecc33e5 (diff) | |
download | libsurvive-ccaa625c6161e14f5c2281cc43134d1928094620.tar.gz libsurvive-ccaa625c6161e14f5c2281cc43134d1928094620.tar.bz2 |
Merge branch 'master' into WinSupport2
# Conflicts:
# src/survive_vive.c
Diffstat (limited to 'src/survive.c')
-rwxr-xr-x | src/survive.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/survive.c b/src/survive.c index 9d0ef01..81c45c3 100755 --- a/src/survive.c +++ b/src/survive.c @@ -66,7 +66,8 @@ SurviveContext * survive_init( int headless ) ctx->lh_config = malloc( sizeof(config_group) * NUM_LIGHTHOUSES); init_config_group(ctx->global_config_values,10); - init_config_group(ctx->lh_config,10); + init_config_group(&ctx->lh_config[0],10); + init_config_group(&ctx->lh_config[1],10); config_read(ctx, "config.json"); @@ -263,9 +264,10 @@ struct SurviveObject * survive_get_so_by_name( struct SurviveContext * ctx, cons int survive_simple_inflate( struct SurviveContext * ctx, const char * input, int inlen, char * output, int outlen ) { + //Tricky: we actually get 2 bytes of data on the front. I don't know what it's for. 0x78 0x9c - puff doesn't deal with it well. unsigned long ol = outlen; - unsigned long il = inlen; - int ret = puff( output, &ol, input, &il ); + unsigned long il = inlen-2; + int ret = puff( output, &ol, input+2, &il ); if( ret == 0 ) return ol; else |