added some stuff

This commit is contained in:
snarmph 2021-10-03 17:03:11 +02:00
parent 449e9d726f
commit d8b44c1281
5 changed files with 91 additions and 8 deletions

View file

@ -324,6 +324,8 @@ str_ostream_t ostrInitStr(const char *cstr, size_t len) {
str_ostream_t stream;
stream.buf = malloc(len + 1);
memcpy(stream.buf, cstr, len);
stream.size = len;
stream.allocated = len + 1;
return stream;
}