1
0
Fork 0

Merge pull request #3800 from liushuyu/master

citra: correct regex for matching nickname
This commit is contained in:
James Rowe 2018-05-31 22:14:39 -06:00 committed by GitHub
commit 174241ff90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ int main(int argc, char** argv) {
address = match[3];
if (!match[4].str().empty())
port = std::stoi(match[4]);
std::regex nickname_re("^[a-zA-Z0-9._- ]+$");
std::regex nickname_re("^[a-zA-Z0-9._\\- ]+$");
if (!std::regex_match(nickname, nickname_re)) {
std::cout
<< "Nickname is not valid. Must be 4 to 20 alphanumeric characters.\n";