diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-09-08 04:55:36 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-09-08 04:55:36 +0000 |
commit | da7b8c1260d91e3306eb18dd65633567cb31332f (patch) | |
tree | 1fad88d0c8f5bb0953887c268e9a5a55910931d8 /src/rpcwallet.cpp | |
parent | ddb709e9de1490afcfa1af045517d2228d5b864c (diff) |
Bugfix: Initialize CWallet::nOrderPosNext on an empty wallet, and save it in db
Diffstat (limited to 'src/rpcwallet.cpp')
-rw-r--r-- | src/rpcwallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 20df4c0a68..475fe1baf9 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -544,7 +544,7 @@ Value movecmd(const Array& params, bool fHelp) // Debit CAccountingEntry debit; - debit.nOrderPos = pwalletMain->nOrderPosNext++; + debit.nOrderPos = pwalletMain->IncOrderPosNext(); debit.strAccount = strFrom; debit.nCreditDebit = -nAmount; debit.nTime = nNow; @@ -554,7 +554,7 @@ Value movecmd(const Array& params, bool fHelp) // Credit CAccountingEntry credit; - credit.nOrderPos = pwalletMain->nOrderPosNext++; + credit.nOrderPos = pwalletMain->IncOrderPosNext(); credit.strAccount = strTo; credit.nCreditDebit = nAmount; credit.nTime = nNow; |