aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-11-16 17:37:05 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-11-16 17:37:27 +0300
commit93c043d0bc755f6c9cffea489116ae742795a152 (patch)
treed83a62fa1847de0355a1534ff73195d7dee06472
parent39c4230a41cdda3ba47ce1bb70cd2780d9da988d (diff)
Fix broken repository_location constructor
The order of arguments evaluation is unspecified.
-rw-r--r--libbpkg/manifest.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/libbpkg/manifest.cxx b/libbpkg/manifest.cxx
index a88ea41..e93f0cb 100644
--- a/libbpkg/manifest.cxx
+++ b/libbpkg/manifest.cxx
@@ -2367,10 +2367,11 @@ namespace bpkg
"mismatching repository types: " + to_string (*t) + " specified, " +
to_string (*tu.type) + " in URL scheme");
- *this = repository_location (move (tu.url),
- tu.type ? *tu.type :
- t ? *t :
- guess_type (tu.url, local));
+ repository_type et (tu.type ? *tu.type :
+ t ? *t :
+ guess_type (tu.url, local));
+
+ *this = repository_location (move (tu.url), et);
}
repository_location::