Don't pass pointer into temporary string!

This commit is contained in:
Celtic Minstrel 2016-11-29 00:37:35 -05:00 committed by GitHub
parent a67f91987e
commit 4ee94f6128

View file

@ -438,7 +438,8 @@ node& node::set_attr_dup(const char* key, const string_span& value)
node& node::set_attr_int(const char* key, int value)
{
return set_attr_dup(key, std::to_string(value).c_str());
std::string temp = std::to_string(value);
return set_attr_dup(key, temp.c_str());
}
node& node::add_child_at(const char* name, size_t index)