mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
The string class returns string::npos, when find() fails.
Noticed when sign-comparison warnings were enabled.
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user