summaryrefslogtreecommitdiff
path: root/src/item.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/item.cc')
-rw-r--r--src/item.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/item.cc b/src/item.cc
index 3845e4cb..9290ab2f 100644
--- a/src/item.cc
+++ b/src/item.cc
@@ -166,6 +166,7 @@ void item_t::parse_tags(const char * p,
string tag;
bool by_value = false;
+ bool first = true;
for (char * q = std::strtok(buf.get(), " \t");
q;
q = std::strtok(NULL, " \t")) {
@@ -191,7 +192,7 @@ void item_t::parse_tags(const char * p,
(*i).second.second = true;
}
}
- else if (q[len - 1] == ':') { // a metadata setting
+ else if (first && q[len - 1] == ':') { // a metadata setting
int index = 1;
if (q[len - 2] == ':') {
by_value = true;
@@ -199,6 +200,7 @@ void item_t::parse_tags(const char * p,
}
tag = string(q, len - index);
}
+ first = false;
}
}