This commit is contained in:
2020-03-18 23:15:34 +01:00
parent 435fab86e3
commit f8421e9ffe
2 changed files with 3 additions and 3 deletions

2
cfg.h
View File

@@ -66,7 +66,7 @@ string string_from_cstr(char* c) {
}
void string_grow_min(string* s, size_t min_growth) {
s->cap = max(min_growth, s->cap*GROWTH_FACTOR);
s->cap = max(s->cap+min_growth, s->cap*GROWTH_FACTOR);
s->str = realloc(s->str, s->cap);
}