Merge branch 'v0.19.x'

This commit is contained in:
Max Kellermann
2016-03-07 14:30:43 +01:00
7 changed files with 41 additions and 23 deletions

View File

@@ -78,7 +78,7 @@ ParseCommandArgRange(const char *s)
throw FormatProtocolError(ACK_ERROR_ARG,
"Number is negative: %s", s);
if (unsigned(value) > std::numeric_limits<unsigned>::max())
if (value > std::numeric_limits<int>::max())
throw FormatProtocolError(ACK_ERROR_ARG,
"Number too large: %s", s);
@@ -99,7 +99,8 @@ ParseCommandArgRange(const char *s)
throw FormatProtocolError(ACK_ERROR_ARG,
"Number is negative: %s", s);
if (unsigned(value) > std::numeric_limits<unsigned>::max())
if (value > std::numeric_limits<int>::max())
throw FormatProtocolError(ACK_ERROR_ARG,
"Number too large: %s", s);