If a boolean value is to an amount, use 1 or 0
This commit is contained in:
parent
dfee8bc691
commit
6bfb4206b1
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue