Skip to content

Commit 87a3f13

Browse files
committed
refactor: Replace use of atoi64 in wallet ReadOrderPos
Replace use of `atoi64` with error-checking `ParseInt64`.
1 parent afb5809 commit 87a3f13

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/wallet/wallet.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,10 @@ typedef std::map<std::string, std::string> mapValue_t;
200200

201201
static inline void ReadOrderPos(int64_t& nOrderPos, mapValue_t& mapValue)
202202
{
203-
if (!mapValue.count("n"))
203+
if (!mapValue.count("n") || !ParseInt64(mapValue["n"], &nOrderPos))
204204
{
205205
nOrderPos = -1; // TODO: calculate elsewhere
206-
return;
207206
}
208-
nOrderPos = atoi64(mapValue["n"].c_str());
209207
}
210208

211209

0 commit comments

Comments
 (0)