Skip to content

Commit acb3827

Browse files
committed
Fix crash when /tyre command called with no arguments
1 parent e7f854a commit acb3827

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/network/protocols/command_manager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,7 @@ void CommandManager::process_tyre(Context& context)
12081208

12091209
if (argv.size() < 2) {
12101210
context.error();
1211+
return;
12111212
}
12121213

12131214
int value = readTyre(argv[1]);
@@ -1229,6 +1230,7 @@ void CommandManager::process_handicap(Context& context)
12291230

12301231
if (argv.size() < 2) {
12311232
context.error();
1233+
return;
12321234
}
12331235

12341236
unsigned value = -1;

0 commit comments

Comments
 (0)