summaryrefslogtreecommitdiff
path: root/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'value.h')
-rw-r--r--value.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/value.h b/value.h
index 34af0f73..39a258b5 100644
--- a/value.h
+++ b/value.h
@@ -46,8 +46,9 @@ class value_t
*((unsigned int *) data) = value;
type = INTEGER;
}
- value_t(const amount_t& value) : type(INTEGER) {
- *this = value;
+ value_t(const amount_t& value) {
+ new((amount_t *)data) amount_t(value);
+ type = AMOUNT;
}
value_t(const balance_t& value) : type(INTEGER) {
*this = value;