Fix bug with command length

This commit is contained in:
Akkadius
2019-08-09 00:43:25 -05:00
parent 5fce042a31
commit ea15e9bc5f
4 changed files with 126 additions and 113 deletions
+4 -4
View File
@@ -148,10 +148,10 @@ namespace EQEmuCommand {
int max_command_length = 0;
for (auto &it: in_function_map) {
if (it.first.length() > max_command_length) {
std::stringstream command;
command << termcolor::colorize << termcolor::yellow << it.first << termcolor::reset;
max_command_length = command.str().length() + 5;
std::stringstream command;
command << termcolor::colorize << termcolor::yellow << it.first << termcolor::reset;
if (command.str().length() > max_command_length) {
max_command_length = command.str().length() + 1;
}
}