From 3c45393b2d1955cf172c95306a0ff79e1e0e925d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20=C3=85ldstedt=20Sund?= Date: Mon, 23 Oct 2017 23:23:10 +0200 Subject: [PATCH] Don't call copy_l before all other members are set This lead to undefined behaviour during copy. --- include/crow/json.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/crow/json.h b/include/crow/json.h index d8dbace7f..7cec94fd6 100644 --- a/include/crow/json.h +++ b/include/crow/json.h @@ -238,9 +238,9 @@ namespace crow start_ = r.start_; end_ = r.end_; key_ = r.key_; - copy_l(r); t_ = r.t_; option_ = r.option_; + copy_l(r); return *this; } rvalue& operator = (rvalue&& r) noexcept