From 5754d4cca6377debcfc2922b278f25d8f5b5e2ee Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 5 Feb 2019 20:16:01 -1100 Subject: [PATCH] & --- src/cc/rogue_rpc.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cc/rogue_rpc.cpp b/src/cc/rogue_rpc.cpp index 8ed303582..446701ca3 100644 --- a/src/cc/rogue_rpc.cpp +++ b/src/cc/rogue_rpc.cpp @@ -453,7 +453,7 @@ UniValue rogue_playerinfo(uint64_t txfee,struct CCcontract_info *cp,cJSON *param { UniValue pobj(UniValue::VOBJ); t = jbits256(jitem(params,0),0); - memcpy(&playertxid,t,sizeof(playertxid));; + memcpy(&playertxid,&t,sizeof(playertxid));; if ( rogue_playerdata(cp,origplayergame,pk,playerdata,playertxid) < 0 ) return(cclib_error(result,"invalid playerdata")); result.push_back(Pair("rogue",rogue_playerobj(pobj,playerdata))); @@ -482,13 +482,13 @@ UniValue rogue_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params) if ( n > 0 ) { t = jbits256(jitem(params,0),0); - memcpy(&gametxid,t,sizeof(gametxid)); + memcpy(&gametxid,&t,sizeof(gametxid)); if ( rogue_isvalidgame(cp,tx,buyin,maxplayers,gametxid) == 0 ) { if ( n > 1 && maxplayers > 1 ) { t = jbits256(jitem(params,0),0); - memcpy(&playertxid,t,sizeof(playertxid)); + memcpy(&playertxid,&t,sizeof(playertxid)); if ( rogue_playerdata(cp,origplayergame,pk,playerdata,playertxid) < 0 ) return(cclib_error(result,"couldnt extract valid playerdata")); } @@ -497,7 +497,7 @@ UniValue rogue_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params) return(cclib_error(result,"couldnt find available registration baton")); else if ( playertxid != zeroid && rogue_playerdataspend(mtx,playertxid,origplayergame) < 0 ) return(cclib_error(result,"couldnt find playerdata to spend")); - else if ( buyin > 0 && AddNormalInputs(mtx,mypk,buyin,64) < buyin ) + else if ( buyin > 0 && AddNormalinputs(mtx,mypk,buyin,64) < buyin ) return(cclib_error(result,"couldnt find enough normal funds for buyin")); mtx.vout.push_back(MakeCC1of2vout(cp->evalcode,inputsum-txfee,roguepk,mypk)); rawtx = FinalizeCCTx(0,cp,mtx,mypk,txfee,rogue_registeropret(gametxid,playertxid)); @@ -523,7 +523,7 @@ UniValue rogue_keystrokes(uint64_t txfee,struct CCcontract_info *cp,cJSON *param if ( (params= cclib_reparse(&n,params)) != 0 && n == 2 && (keystrokestr= jstr(jitem(params,1),0)) != 0 ) { t = jbits256(jitem(params,0),0); - memcpy(&gametxid,t,sizeof(gametxid)); + memcpy(&gametxid,&t,sizeof(gametxid)); keystrokes = ParseHex(keystrokestr); mypk = pubkey2pk(Mypubkey()); roguepk = GetUnspendable(cp,0); @@ -589,7 +589,7 @@ UniValue rogue_gameinfo(uint64_t txfee,struct CCcontract_info *cp,cJSON *params) if ( n > 0 ) { t = jbits256(jitem(params,0),0); - memcpy(&txid,t,sizeof(txid)); + memcpy(&txid,&t,sizeof(txid)); result.push_back(Pair("txid",txid.GetHex())); if ( rogue_isvalidgame(cp,tx,buyin,maxplayers,txid) == 0 ) {