From 317089b76b511f8ffa8453df3f5768201137c798 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 14 Feb 2014 02:38:53 +0100 Subject: [PATCH] Merge --- code/nel/src/misc/i18n.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/nel/src/misc/i18n.cpp b/code/nel/src/misc/i18n.cpp index 8aaa8df6e..e53750af7 100644 --- a/code/nel/src/misc/i18n.cpp +++ b/code/nel/src/misc/i18n.cpp @@ -323,6 +323,23 @@ bool CI18N::parseLabel(ucstring::const_iterator &it, ucstring::const_iterator &l ucstring::const_iterator rewind = it; label.erase(); + // first char must be A-Za-z@_ + if (it != last && + ( + (*it >= '0' && *it <= '9') + || (*it >= 'A' && *it <= 'Z') + || (*it >= 'a' && *it <= 'z') + || (*it == '_') + || (*it == '@') + ) + ) + label.push_back(char(*it++)); + else + { + it = rewind; + return false; + } + // other char must be [0-9A-Za-z@_]* while (it != last && (