use single-character find for bad alphabet

This commit is contained in:
Michael Nutt 2022-05-13 19:01:20 +09:00
parent 62a1e1c0cd
commit 9599c1f05c

View File

@ -117,7 +117,7 @@ public:
if (auto alpha_col = checkAndGetColumnConst<ColumnString>(alphabetcolumn.get()))
{
alphabet = alpha_col->getValue<String>();
if (alphabet.find("\0") != std::string::npos)
if (alphabet.find('\0') != std::string::npos)
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Custom alphabet must not contain null character");
}
}