Merge pull request #717 from TheBlueMatt/installerqtupgrade
[novacoin.git] / src / qt / optionsmodel.cpp
index 35d0b57..a68c84c 100644 (file)
@@ -102,7 +102,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);