From bcb9588ea24d32055c5cc0493efc737b168f4978 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 12 Aug 2020 18:01:24 +0300 Subject: Fix assertion failure in to_stream() for target key without extension Also fix a similar assertion. --- libbuild2/target.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx index 34f3f72..7327b1b 100644 --- a/libbuild2/target.cxx +++ b/libbuild2/target.cxx @@ -54,7 +54,7 @@ namespace build2 target::combine_name (v, ext, false /* @@ TODO: what to do? */); } else - assert (!ext); + assert (!ext || ext->empty ()); // Unspecified or none. r.emplace_back (*dir, type->name, move (v)); @@ -547,7 +547,7 @@ namespace build2 } } else - assert (!k.ext); + assert (!k.ext || k.ext->empty ()); // Unspecified or none. } else to_stream (os, -- cgit v1.1