From 365c053dc5e1569039e13896d586e748f1952865 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 10 Feb 2019 10:02:52 -1100 Subject: [PATCH] Guard tokenid setting --- src/cc/rogue_rpc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cc/rogue_rpc.cpp b/src/cc/rogue_rpc.cpp index 7903d2929..43754edd4 100644 --- a/src/cc/rogue_rpc.cpp +++ b/src/cc/rogue_rpc.cpp @@ -702,7 +702,8 @@ UniValue rogue_register(uint64_t txfee,struct CCcontract_info *cp,cJSON *params) if ( DecodeTokenOpRet(playertx.vout.back().scriptPubKey, e, tokenid, voutPubkeys, vopretFinish, vopret2) != 0) { // if token in the opret didtx = 1; - tokenid = playertxid; + if ( tokenid == zeroid ) + tokenid = playertxid; rawtx = FinalizeCCTx(0, cp, mtx, mypk, txfee, EncodeTokenOpRet(tokenid, voutPubkeysEmpty /*=never spent*/, vopretFinish /*=non-fungible*/, opretRegister)); }