GetResStr: Match lines nongreedily (#993)

With greedy matching enabled, . (dot) would also match newlines.
stable-5.4
Nicolas Hake 2013-11-08 01:06:49 +01:00
parent 0757a0b834
commit f0550c45b4
1 changed files with 1 additions and 1 deletions

View File

@ -405,7 +405,7 @@ namespace
{
std::string GetResStr(const char *id, const char *stringtbl)
{
static re::regex line_pattern("^([^=]+)=(.*)\\r?$", re::regex_constants::optimize);
static re::regex line_pattern("^([^=]+)=(.*?)\r?$", static_cast<re::regex::flag_type>(re::regex_constants::optimize | re::regex_constants::ECMAScript));
assert(stringtbl);
if (!stringtbl)
{