Fix database renaming with no default database

If no default database was given, it was possible that the code would end
up in an endless loop.
This commit is contained in:
Markus Mäkelä
2019-12-12 13:42:24 +02:00
parent 2f3afa943c
commit 90f7c69f9d
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ std::string pcre2_substitute(pcre2_code* re,
(PCRE2_SPTR) replace.c_str(), replace.length(),
(PCRE2_UCHAR*) &rval[0], &size_tmp)) == PCRE2_ERROR_NOMEMORY)
{
rval.resize(rval.size() * 2);
rval.resize(rval.size() * 2 + 1);
size_tmp = rval.size();
}