From 84fa9cc11a76c41277ab04329e8b37cad08a0f9a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 9 Nov 2017 10:34:58 +0200 Subject: Fix bug in handling of empty target name prefixes (e.g., bin.lib.prefix) --- build2/cc/link.cxx | 2 +- build2/target.cxx | 2 +- 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 { -- cgit v1.1