X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fmain.cpp;h=4f10bfebcce4276cc7954e0fbc761cde2aded423;hp=c4f3d17be3ccc5ba62402d1bb15383dd7c7b4aa7;hb=579798182c5ccf92ef6ceb9c5209819824e5bec4;hpb=2bb194b8d6bd1137877bbb34830c8f56967846dd diff --git a/src/main.cpp b/src/main.cpp index c4f3d17..4f10bfe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -486,6 +486,8 @@ bool CTransaction::CheckTransaction() const if (!fTestNet && !IsCoinBase() && !txout.IsEmpty() && nTime < OUTPUT_SWITCH_TIME && txout.nValue < MIN_TXOUT_AMOUNT) return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue below minimum")); + if (txout.nValue < 0) + return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue is negative")); if (txout.nValue > MAX_MONEY) return DoS(100, error("CTransaction::CheckTransaction() : txout.nValue too high")); nValueOut += txout.nValue;