diff --git a/core/core.h b/core/core.h index b73a00c1..a5cd6d0e 100644 --- a/core/core.h +++ b/core/core.h @@ -297,14 +297,14 @@ char* String_cstr(string *s) { } string String_str(string *s) { - int n = strlen(*s) + 4; + int n = strlen(*s) + 1; string buffer = CARP_MALLOC(n); snprintf(buffer, n, "%s", *s); return buffer; } string String_prn(string *s) { - int n = strlen(*s) + 1; + int n = strlen(*s) + 4; string buffer = CARP_MALLOC(n); snprintf(buffer, n, "@\"%s\"", *s); return buffer;