diff options
author | Erik Åldstedt Sund <erik.sund@conoptica.com> | 2017-10-23 23:23:10 +0200 |
---|---|---|
committer | Erik Åldstedt Sund <erik.sund@conoptica.com> | 2017-10-30 20:51:44 +0100 |
commit | 3c45393b2d1955cf172c95306a0ff79e1e0e925d (patch) | |
tree | 5f98db4fa42d8bcc5a99960f644072414f19e13a | |
parent | 7f3f72441c242836d00ab2109a83baef89c08aaa (diff) | |
download | crow-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.h | 2 |
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 |