Fix tag extraction.
continuous-integration/drone/push Build is passing Details

Attempted to read deleted memory.
This commit is contained in:
tastytea 2020-10-17 03:15:40 +02:00
parent 053d41f1ee
commit 2e0bfd98ff
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 1 deletions

View File

@ -31,6 +31,7 @@
#include <sstream>
#include <stdexcept>
#include <string>
#include <string_view>
#include <vector>
namespace FediBlock::cgi
@ -112,7 +113,7 @@ vector<string> get_tags()
cgi.getElement("tags[]", tags_form);
for (const auto &element : tags_form)
{
const string_view tag{element.getValue()};
const string tag{element.getValue()};
if (!tag.empty())
{
tags_string.push_back(tolower(tag));