From c0f352bc4eb1ac43e91c235585fb3ade7465c271 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Tue, 22 May 2018 21:39:59 -0600 Subject: [PATCH] citra: correct regex for matching nickname --- src/citra/citra.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index 96272c8ab5..33d1a25d56 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp @@ -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";