Skip to content

Commit

Permalink
allow buffer to be null terminated
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-coding committed Feb 17, 2025
1 parent 3622f52 commit a72ed29
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions code/logic/cstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ fossil_io_cstring_stream* fossil_io_cstring_stream_create(size_t initial_size) {
if (stream) {
stream->buffer = (char*)malloc(initial_size);
if (stream->buffer) {
stream->buffer[0] = '\0';
stream->length = 0;
stream->capacity = initial_size;
} else {
Expand Down

0 comments on commit a72ed29

Please sign in to comment.