This commit is contained in:
2026-02-15 19:53:55 +01:00
parent 2162b3eadd
commit 6a9a4cc27b
6 changed files with 35 additions and 27 deletions
@@ -13,7 +13,7 @@ struct string *my_str_init(const char* s, size_t size){
rslt->size = 0;
}
else{
rslt->data = malloc(size);
rslt->data = malloc((1 + size) * sizeof(char*));
if(rslt->data == NULL){
free(rslt);
return NULL;