aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/transaction.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/transaction.h b/src/wallet/transaction.h
index 33cf667cd8..0cd91b9ebe 100644
--- a/src/wallet/transaction.h
+++ b/src/wallet/transaction.h
@@ -217,7 +217,8 @@ public:
const auto it_op = mapValue.find("n");
nOrderPos = (it_op != mapValue.end()) ? atoi64(it_op->second) : -1;
- nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(mapValue["timesmart"]) : 0;
+ const auto it_ts = mapValue.find("timesmart");
+ nTimeSmart = (it_ts != mapValue.end()) ? static_cast<unsigned int>(atoi64(it_ts->second)) : 0;
mapValue.erase("fromaccount");
mapValue.erase("spent");