1.1 --- a/templates/native/common.c Mon Dec 12 00:33:33 2016 +0100
1.2 +++ b/templates/native/common.c Mon Dec 12 00:37:28 2016 +0100
1.3 @@ -34,10 +34,11 @@
1.4 return attr;
1.5 }
1.6
1.7 -__attr __new_str(char *s)
1.8 +__attr __new_str(char *s, size_t size)
1.9 {
1.10 /* Create a new string and mutate the __data__ and __key__ attributes. */
1.11 __attr attr = __new(&__InstanceTable___builtins___str_string, &__builtins___str_string, sizeof(__obj___builtins___str_string));
1.12 + attr.value->attrs[__pos___data__].size = size;
1.13 attr.value->attrs[__pos___data__].strvalue = s;
1.14 attr.value->attrs[__pos___key__] = (__attr) {0, 0};
1.15 return attr;