1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 08:46:38 +02:00

try/catch-ified all instances of convertTo to keep from aborting when a user gives too large or too small a number

This commit is contained in:
Adam
2011-02-04 21:01:33 -05:00
parent faf5f3128f
commit 83556667fd
12 changed files with 236 additions and 144 deletions
+6 -2
View File
@@ -45,8 +45,12 @@ class CommandHSList : public Command
source.Reply(LanguageString::LIST_INCORRECT_RANGE);
return MOD_CONT;
}
from = convertTo<int>(key.substr(1, tmp - 1));
to = convertTo<int>(key.substr(tmp + 1));
try
{
from = convertTo<int>(key.substr(1, tmp - 1));
to = convertTo<int>(key.substr(tmp + 1));
}
catch (const ConvertException &) { }
}
}