fix color-initials command

This commit is contained in:
Maximilian Keßler 2023-08-13 00:10:00 +02:00
parent 62bf71a2f2
commit 3d7015f63d
Signed by: max
GPG Key ID: BCC5A619923C0BA5

View File

@ -188,11 +188,11 @@ namespace Hanabi {
} }
if (prompt.starts_with("set-initials")) { if (prompt.starts_with("set-initials")) {
if (prompt.length() < 12) { if (prompt.length() < 16) {
std::cout << "At least 3 initials need to be specified" << std::endl; std::cout << "At least 3 initials need to be specified" << std::endl;
continue; continue;
} }
const std::string new_initials = prompt.substr(9); const std::string new_initials = prompt.substr(13);
for(size_t i = 0; i < std::min(size_t(6), new_initials.length()); i++) { for(size_t i = 0; i < std::min(size_t(6), new_initials.length()); i++) {
suit_initials[i] = new_initials[i]; suit_initials[i] = new_initials[i];
} }