From 91f11de58d8493d8e163e3e2072670f5f04bda94 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 10 Feb 2019 02:53:45 -1100 Subject: [PATCH] is_cJSON_True --- src/cc/rogue/rogue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cc/rogue/rogue.c b/src/cc/rogue/rogue.c index f7a4a8da0..6bb9d8f83 100644 --- a/src/cc/rogue/rogue.c +++ b/src/cc/rogue/rogue.c @@ -144,6 +144,7 @@ int32_t flushkeystrokes(struct rogue_state *rs) #else uint8_t *OS_fileptr(long *allocsizep,char *fname); +#define is_cJSON_True(json) ((json) != 0 && ((json)->type & 0xff) == cJSON_True) void rogue_setplayerdata(struct rogue_state *rs,char *gametxidstr) { @@ -167,7 +168,7 @@ void rogue_setplayerdata(struct rogue_state *rs,char *gametxidstr) fprintf(stderr,"found ismine:true\n"); if ( (item= jobj(item,"player")) != 0 && (datastr= jstr(item,"data")) != 0 ) { - decode_hex(&rs->P,(int32_t)strlen(datastr)/2,datastr); + decode_hex((uint8_t *)&rs->P,(int32_t)strlen(datastr)/2,datastr); fprintf(stderr,"set datastr[%d]\n",(int32_t)strlen(datastr)); rs->restoring = 1; }