From: Sunny King Date: Thu, 19 Apr 2012 15:41:38 +0000 (+0100) Subject: PPCoin: Fix CreateCoinStake() bug from 747f99fb X-Git-Tag: v0.4.0-unstable~189 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=3f5033eb1380952041e0cf365e09e7dc1a14f54a PPCoin: Fix CreateCoinStake() bug from 747f99fb causing SignSignature()'s first assert firing in script.cpp --- diff --git a/src/wallet.cpp b/src/wallet.cpp index 58e1baf..1b30be8 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -1114,7 +1114,7 @@ bool CWallet::CreateCoinStake(CScript scriptPubKey, unsigned int nBits, CTransac break; } } - if (nCredit > nBalance - nBalanceReserve) + if (nCredit == 0 || nCredit > nBalance - nBalanceReserve) return false; // Calculate coin age reward {