Skip to content

Commit b439474

Browse files
committed
fix: index oob with incomplete autoaim ent
`0>>autoaim ent`
1 parent 518fdf3 commit b439474

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Features/Tas/TasTools/AutoAimTool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ AutoAimTool autoAimTool[2] = {{0}, {1}};
1111
std::shared_ptr<TasToolParams> AutoAimTool::ParseParams(std::vector<std::string> args) {
1212
bool usesEntitySelector = args.size() > 0 && args[0] == "ent";
1313

14-
if (args.size() < 1 || args.size() > (usesEntitySelector ? 4 : 5)) {
14+
if (args.size() < (usesEntitySelector ? 2 : 1) || args.size() > (usesEntitySelector ? 4 : 5)) {
1515
throw TasParserException(Utils::ssprintf("Wrong argument count for tool %s: %d", this->GetName(), args.size()));
1616
}
1717

0 commit comments

Comments
 (0)