summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/value.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/value.cc b/src/value.cc
index 9eb5b2e1..9a7647e1 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -851,6 +851,9 @@ void value_t::in_place_cast(type_t cast_type)
switch (type()) {
case BOOLEAN:
switch (cast_type) {
+ case AMOUNT:
+ set_amount(as_boolean() ? 1L : 0L);
+ return;
case STRING:
set_string(as_boolean() ? "true" : "false");
return;