diff options
author | Louis Brauer <louis@openbooking.ch> | 2024-05-27 12:25:38 +0200 |
---|---|---|
committer | Louis Brauer <louis@openbooking.ch> | 2024-05-27 12:25:38 +0200 |
commit | 4621a25ba476b8222b7fca8b545ad2489469f310 (patch) | |
tree | f6a406c42e5e8faae255d988505d654a29c188dc /xs.h | |
parent | 81cf309e4d0ba6c2debccc21ea4f85e1e6245dc5 (diff) | |
parent | 36764b8ade5ee4686b04acb251f586eec4dacfad (diff) |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'xs.h')
-rw-r--r-- | xs.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -277,7 +277,7 @@ int _xs_get_size(const xs_val *ptr) /* must match _XS_TYPE_SIZE */ { int i; - memcpy(&i, ptr, sizeof(i)); + memcpy(&i, ptr + 1, sizeof(i)); return i; } @@ -299,7 +299,7 @@ int xs_size(const xs_val *data) case XSTYPE_LIST: case XSTYPE_DICT: case XSTYPE_DATA: - len = _xs_get_size(data + 1); + len = _xs_get_size(data); break; @@ -1286,7 +1286,7 @@ xs_data *xs_data_new(const void *data, int size) int xs_data_size(const xs_data *value) /* returns the size of the data stored inside value */ { - return _xs_get_size(value + 1) - (1 + _XS_TYPE_SIZE); + return _xs_get_size(value) - (1 + _XS_TYPE_SIZE); } |