From 87f4c1677bd45366e2e6ebff0dd6c5e84f254482 Mon Sep 17 00:00:00 2001 From: Jan de Visser Date: Tue, 2 Nov 2021 16:45:22 -0400 Subject: [PATCH] LibSQL: Relax assignment rules for Null Values It should be possible to assign a Value of any type to a Value which currently is Null. --- Userland/Libraries/LibSQL/Value.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibSQL/Value.cpp b/Userland/Libraries/LibSQL/Value.cpp index 6eb6bdd6b8..6553a945c7 100644 --- a/Userland/Libraries/LibSQL/Value.cpp +++ b/Userland/Libraries/LibSQL/Value.cpp @@ -261,6 +261,8 @@ Value& Value::operator=(Value const& other) if (this != &other) { if (other.is_null()) { assign(null()); + } else if (is_null()) { + assign(other); } else { VERIFY(can_cast(other)); assign(other);