Fix tag extraction.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Attempted to read deleted memory.
This commit is contained in:
parent
053d41f1ee
commit
2e0bfd98ff
|
@ -31,6 +31,7 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <string_view>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace FediBlock::cgi
|
namespace FediBlock::cgi
|
||||||
|
@ -112,7 +113,7 @@ vector<string> get_tags()
|
||||||
cgi.getElement("tags[]", tags_form);
|
cgi.getElement("tags[]", tags_form);
|
||||||
for (const auto &element : tags_form)
|
for (const auto &element : tags_form)
|
||||||
{
|
{
|
||||||
const string_view tag{element.getValue()};
|
const string tag{element.getValue()};
|
||||||
if (!tag.empty())
|
if (!tag.empty())
|
||||||
{
|
{
|
||||||
tags_string.push_back(tolower(tag));
|
tags_string.push_back(tolower(tag));
|
||||||
|
|
Reference in New Issue