From 02d5d7693c79de278cbc1fe4bb4b1bf957a7895a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 Oct 2022 06:08:46 +0200 Subject: Fix bug in file_cache::entry move constructor and assignment operator --- libbuild2/file-cache.ixx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libbuild2') diff --git a/libbuild2/file-cache.ixx b/libbuild2/file-cache.ixx index b4773e7..f8a49cc 100644 --- a/libbuild2/file-cache.ixx +++ b/libbuild2/file-cache.ixx @@ -72,6 +72,7 @@ namespace build2 comp_path_ (move (e.comp_path_)), pin_ (e.pin_) { + e.state_ = null; } inline file_cache::entry& file_cache::entry:: @@ -80,11 +81,14 @@ namespace build2 if (this != &e) { assert (state_ == null); + temporary = e.temporary; state_ = e.state_; path_ = move (e.path_); comp_path_ = move (e.comp_path_); pin_ = e.pin_; + + e.state_ = null; } return *this; } -- cgit v1.1