From 93c043d0bc755f6c9cffea489116ae742795a152 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 16 Nov 2018 17:37:05 +0300 Subject: Fix broken repository_location constructor The order of arguments evaluation is unspecified. --- libbpkg/manifest.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libbpkg') 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:: -- cgit v1.1