summaryrefslogtreecommitdiff
path: root/src/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.h')
-rw-r--r--src/value.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/value.h b/src/value.h
index eba9f6a0..4f5908b3 100644
--- a/src/value.h
+++ b/src/value.h
@@ -180,8 +180,10 @@ class value_t
if (type != STRING) {
destroy();
type = STRING;
+ new((string *) data) string(str);
+ } else {
+ as_string() = str;
}
- as_string() = str;
return *this;
}