aboutsummaryrefslogtreecommitdiff
path: root/src/survive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/survive.c')
-rwxr-xr-xsrc/survive.c8
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