mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
The string class returns string::npos, when find() fails.
Noticed when sign-comparison warnings were enabled.
This commit is contained in:
parent
5a701eb7ea
commit
ab9dc75a18
3 changed files with 7 additions and 7 deletions
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue