summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/value.cc b/src/value.cc
index a3a05b6c..4529300a 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -983,6 +983,8 @@ void value_t::in_place_cast(type_t cast_type)
if (type() == cast_type)
return;
+ _dup();
+
if (cast_type == BOOLEAN) {
set_boolean(bool(*this));
return;