diff options
author | Max Kellermann <max@duempel.org> | 2016-03-07 14:30:43 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2016-03-07 14:30:43 +0100 |
commit | 6ff01cc72c762d9f9b7423eadb7b3bd69c8800a6 (patch) | |
tree | 5a2f1ce975b99e1163b138252d99c1c3a797d9ca /src/protocol | |
parent | 031410c72b4622f265386c21fd1496e38779c2ba (diff) | |
parent | e140a28073f75375a33b28bcbcd0ecc669c5a518 (diff) |
Merge branch 'v0.19.x'
Diffstat (limited to 'src/protocol')
-rw-r--r-- | src/protocol/ArgParser.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/protocol/ArgParser.cxx b/src/protocol/ArgParser.cxx index 454e2ee39..8557464fd 100644 --- a/src/protocol/ArgParser.cxx +++ b/src/protocol/ArgParser.cxx @@ -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); |