aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-09 10:34:58 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-09 10:34:58 +0200
commit84fa9cc11a76c41277ab04329e8b37cad08a0f9a (patch)
treef1cc6dc1b805cac3e0833b487189870b85f2da75
parent251d1f075a7c46a034d4bd22474b5ebd8238c64c (diff)
Fix bug in handling of empty target name prefixes (e.g., bin.lib.prefix)
-rw-r--r--build2/cc/link.cxx2
-rw-r--r--build2/target.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx
index 80eb995..4e22151 100644
--- a/build2/cc/link.cxx
+++ b/build2/cc/link.cxx
@@ -236,7 +236,7 @@ namespace build2
path b (ls.dir);
path cp; // Clean pattern.
{
- if (pfx == nullptr)
+ if (pfx == nullptr || pfx[0] == '\0')
{
b /= ls.name;
}
diff --git a/build2/target.cxx b/build2/target.cxx
index d3af0c5..062db06 100644
--- a/build2/target.cxx
+++ b/build2/target.cxx
@@ -583,7 +583,7 @@ namespace build2
{
path_type p (dir);
- if (np == nullptr)
+ if (np == nullptr || np[0] == '\0')
p /= name;
else
{