1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-12 03:36:32 +00:00

workaround for - in names

This commit is contained in:
Marc Zinnschlag 2013-06-21 14:20:52 +02:00
parent 8b909ff838
commit a2aa3aaa0e

View File

@ -343,7 +343,11 @@ namespace Compiler
} }
else if (!(c=='"' && name.empty())) else if (!(c=='"' && name.empty()))
{ {
if (!(std::isalpha (c) || std::isdigit (c) || c=='_')) if (!(std::isalpha (c) || std::isdigit (c) || c=='_' ||
/// \todo add an option to disable the following hack. Also, find out who is
/// responsible for allowing it in the first place and meet up with that person in
/// a dark alley.
(c=='-' && !name.empty() && std::isalpha (mStream.peek()))))
{ {
putback (c); putback (c);
break; break;