Fix pointer const-ness in parse_tags()
This commit is contained in:
parent
98e6075af8
commit
684a9c6cbf
1 changed files with 2 additions and 2 deletions
|
|
@ -116,8 +116,8 @@ void item_t::set_tag(const string& tag,
|
|||
|
||||
void item_t::parse_tags(const char * p, int current_year)
|
||||
{
|
||||
if (char * b = std::strchr(p, '[')) {
|
||||
if (char * e = std::strchr(p, ']')) {
|
||||
if (const char * b = std::strchr(p, '[')) {
|
||||
if (const char * e = std::strchr(p, ']')) {
|
||||
char buf[256];
|
||||
std::strncpy(buf, b + 1, e - b - 1);
|
||||
buf[e - b - 1] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue