diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 538eb3d54..a6c4a8486 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1201,7 +1201,7 @@ bool CWallet::UpdatedNoteData(const CWalletTx& wtxIn, CWalletTx& wtx) * If fUpdate is true, existing transactions will be updated. */ extern uint8_t NOTARY_PUBKEY33[33]; -bool pubkey2addr(char *destaddr,uint8_t *pubkey33); +bool pubkey2addr(char destaddr,uint8_t *pubkey33); bool RaddIsPubkey(char *address) { char exaddress[18]; @@ -1228,7 +1228,8 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl { if (ExtractDestination(txin.vout[tx.vin[0].prevout.n].scriptPubKey, address)) { //fprintf(stderr, "address on prev vin is in wallet: %s\n",CBitcoinAddress(address).ToString().c_str()); - if ( RaddIsPubkey((char *)CBitcoinAddress(address).ToString().c_str()) == true ) { + char chraddress[18]; strcpy(chraddress,CBitcoinAddress(address).ToString().c_str()) + if ( RaddIsPubkey(chraddress) == true ) { numvinIsOurs++; fprintf(stderr, "address on prev vin is in wallet: %s\n",CBitcoinAddress(address).ToString().c_str()); } @@ -1239,7 +1240,8 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl for (size_t i = 0; i < tx.vout.size() ; i++) { CTxDestination address2; if ( ExtractDestination(tx.vout[i].scriptPubKey, address2)) { - if ( RaddIsPubkey((char *)CBitcoinAddress(address2).ToString().c_str()) == true ) { + char chraddress[18]; strcpy(chraddress,CBitcoinAddress(address).ToString().c_str()) + if ( RaddIsPubkey(chraddress) == true ) { fprintf(stderr, "vout is to our address: %s\n",CBitcoinAddress(address2).ToString().c_str()); numvoutIsOurs++; totalvoutvalue = totalvoutvalue + tx.vout[i].nValue;