diff options
author | Jeff Garzik <jeff@garzik.org> | 2012-04-15 16:47:24 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-04-15 16:47:24 -0400 |
commit | ab9dc75a183c7a46e38e957ee3192d5febcccb3c (patch) | |
tree | 4af4074d5ef5859ce780af39f483cb02f5da5da2 /src/bitcoinrpc.cpp | |
parent | 5a701eb7ea16b87b56263996ee8e98ec89e2a3d8 (diff) |
The string class returns string::npos, when find() fails.
Noticed when sign-comparison warnings were enabled.
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r-- | src/bitcoinrpc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index 63c51ada8d..f0d27fad99 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -201,7 +201,7 @@ Value help(const Array& params, bool fHelp) // Help text is returned in an exception string strHelp = string(e.what()); if (strCommand == "") - if (strHelp.find('\n') != -1) + if (strHelp.find('\n') != string::npos) strHelp = strHelp.substr(0, strHelp.find('\n')); strRet += strHelp + "\n"; } |