diff --git a/src/Mod/Web/App/AppWeb.cpp b/src/Mod/Web/App/AppWeb.cpp index d89e3ef568..54b2a9ebbc 100644 --- a/src/Mod/Web/App/AppWeb.cpp +++ b/src/Mod/Web/App/AppWeb.cpp @@ -89,7 +89,7 @@ private: if (!PyArg_ParseTuple(args.ptr(), "|si", &addr, &port)) { throw Py::Exception(); } - if (port > USHRT_MAX) { + if (port > std::numeric_limits::max()) { throw Py::OverflowError("port number is greater than maximum"); } else if (port < 0) { @@ -121,7 +121,7 @@ private: if (!PyArg_ParseTuple(args.ptr(), "|sii", &addr, &port, &timeout)) { throw Py::Exception(); } - if (port > USHRT_MAX) { + if (port > std::numeric_limits::max()) { throw Py::OverflowError("port number is greater than maximum"); } else if (port < 0) {