mirror of
https://github.com/jwinterm/myriadcoin.git
synced 2026-11-25 11:24:13 +01:00
Use std::numeric_limits<> for typesafe INT_MAX/etc
(this fixes a Mac OS X gitian build error for 0.5.x)
This commit is contained in:
committed by
Luke Dashjr
parent
3703150d56
commit
0ce74bfaa5
@@ -101,7 +101,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
|
||||
case ProxyPort:
|
||||
{
|
||||
int nPort = atoi(value.toString().toAscii().data());
|
||||
if (nPort > 0 && nPort < USHRT_MAX)
|
||||
if (nPort > 0 && nPort < std::numeric_limits<unsigned short>::max())
|
||||
{
|
||||
addrProxy.port = htons(nPort);
|
||||
walletdb.WriteSetting("addrProxy", addrProxy);
|
||||
|
||||
Reference in New Issue
Block a user