If an item tag is already set, don't overwrite it

This commit is contained in:
John Wiegley 2009-02-26 05:33:06 -04:00
parent badea00584
commit 69e2c733b9

View file

@ -140,6 +140,7 @@ void item_t::parse_tags(const char * p, int current_year)
q = std::strtok(NULL, " \t")) { q = std::strtok(NULL, " \t")) {
const std::size_t len = std::strlen(q); const std::size_t len = std::strlen(q);
if (! tag.empty()) { if (! tag.empty()) {
if (! has_tag(tag))
set_tag(tag, string(p + (q - buf.get()))); set_tag(tag, string(p + (q - buf.get())));
break; break;
} }