From 9c3643d5a44e17e7d539867a1af57bae548f1a37 Mon Sep 17 00:00:00 2001 From: ZhuangYumin Date: Thu, 14 Dec 2023 14:12:13 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=B3=E9=94=AE=E8=AF=8D?= =?UTF-8?q?=E7=BB=84=E7=9A=84=E6=80=BB=E9=95=BF=E5=BA=A6=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/lexer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/lexer.cpp b/backend/src/lexer.cpp index 22f05e6..65c6288 100644 --- a/backend/src/lexer.cpp +++ b/backend/src/lexer.cpp @@ -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