增加关键词组的总长度检测

This commit is contained in:
2023-12-14 14:12:13 +00:00
parent 60ae8ec9d1
commit 9c3643d5a4

View File

@ -357,6 +357,7 @@ bool CommandModifyLexer(const std::string &command, std::string &ISBN,
author = token.substr(8 + 1, token.size() - 9 - 1);
} else if (token[1] == 'k') {
keyword = token.substr(9 + 1, token.size() - 10 - 1);
if (keyword.length() > 60) return false;
} else if (token[1] == 'p') {
price = std::stod(token.substr(7));
} else