libcmd/repl-interacter: INT_MAX -> numeric_limits

This commit is contained in:
Robert Hensing 2024-07-15 15:08:41 +02:00
parent 8a855296f5
commit 6bbd493d49

View file

@ -73,7 +73,7 @@ static int listPossibleCallback(char * s, char *** avp)
{ {
auto possible = curRepl->completePrefix(s); auto possible = curRepl->completePrefix(s);
if (possible.size() > (INT_MAX / sizeof(char *))) if (possible.size() > (std::numeric_limits<int>::max() / sizeof(char *)))
throw Error("too many completions"); throw Error("too many completions");
int ac = 0; int ac = 0;