aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Åldstedt Sund <erik.sund@conoptica.com>2017-10-23 23:23:10 +0200
committerErik Åldstedt Sund <erik.sund@conoptica.com>2017-10-30 20:51:44 +0100
commit3c45393b2d1955cf172c95306a0ff79e1e0e925d (patch)
tree5f98db4fa42d8bcc5a99960f644072414f19e13a
parent7f3f72441c242836d00ab2109a83baef89c08aaa (diff)
downloadcrow-3c45393b2d1955cf172c95306a0ff79e1e0e925d.tar.gz
crow-3c45393b2d1955cf172c95306a0ff79e1e0e925d.zip
Don't call copy_l before all other members are set
This lead to undefined behaviour during copy.
-rw-r--r--include/crow/json.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/crow/json.h b/include/crow/json.h
index d8dbace..7cec94f 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