]> granicus.if.org Git - icinga2/commitdiff
Fix incorrect assignment in String::operator=
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 2 Sep 2016 06:14:15 +0000 (08:14 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 2 Sep 2016 06:14:46 +0000 (08:14 +0200)
refs #12619

lib/base/string.cpp

index e8b9dbfe36bd0d8aa4b52676da27553f08e884be..af1adb8eb4817560ed9d5f8449b383b9991ce9b4 100644 (file)
@@ -41,7 +41,7 @@ String& String::operator=(Value&& other)
        if (other.IsString())
                m_Data = std::move(other.Get<String>());
        else
-               m_Data = other;
+               *this = static_cast<String>(other);
 
        return *this;
 }