summaryrefslogtreecommitdiff
path: root/odb/parser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/parser.cxx')
-rw-r--r--odb/parser.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/odb/parser.cxx b/odb/parser.cxx
index ff9f6d0..275da33 100644
--- a/odb/parser.cxx
+++ b/odb/parser.cxx
@@ -951,7 +951,11 @@ emit ()
for (pfx = scope_->fq_name (); !pfx.empty (); pfx = scope_->fq_name ())
{
- if (ns.compare (0, pfx.size (), pfx) == 0)
+ size_t n (pfx.size ());
+
+ // Make sure we handle cases like ns="::foobar", pfx="::foo".
+ //
+ if (ns.compare (0, n, pfx) == 0 && (ns.size () == n || ns[n - 1] == ':'))
break;
if (trace)