summaryrefslogtreecommitdiffstats
path: root/dstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'dstring.c')
-rw-r--r--dstring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dstring.c b/dstring.c
index d370598..bfcf9bd 100644
--- a/dstring.c
+++ b/dstring.c
@@ -37,7 +37,7 @@ static struct dstring *dstrheader(const char *dstr) {
/** Get the correct size for a dstring with the given capacity. */
static size_t dstrsize(size_t capacity) {
- return sizeof(struct dstring) + capacity + 1;
+ return BFS_FLEX_SIZEOF(struct dstring, data, capacity + 1);
}
/** Allocate a dstring with the given contents. */