diff options
author | default <nobody@localhost> | 2023-04-10 15:12:09 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-04-10 15:12:09 +0200 |
commit | aa0b8732aa375440b81e176dcc868ed3540c302d (patch) | |
tree | df49b09197b2e7e229881988855626f2c0e8bf13 /xs.h | |
parent | 9e9d740199e11ca79463f9f4df6f55f0e25cc1aa (diff) | |
parent | 5ae107188f1587d09bb52b3b6c5d661bcfb1724d (diff) |
Merge https://codeberg.org/grunfink/snac2
Diffstat (limited to 'xs.h')
-rw-r--r-- | xs.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1057,12 +1057,12 @@ xs_data *xs_data_new(const void *data, int size) xs_data *v; /* add the overhead (data type + 24bit size) */ - size += 4; + int total_size = size + 4; - v = xs_realloc(NULL, _xs_blk_size(size)); + v = xs_realloc(NULL, _xs_blk_size(total_size)); v[0] = XSTYPE_DATA; - _xs_put_24b(v + 1, size); + _xs_put_24b(v + 1, total_size); memcpy(&v[4], data, size); |