From 36764b8ade5ee4686b04acb251f586eec4dacfad Mon Sep 17 00:00:00 2001 From: default Date: Mon, 27 May 2024 05:49:29 +0200 Subject: Minor tweak to markdown-like links. --- xs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xs.h') diff --git a/xs.h b/xs.h index 972665c..56771e1 100644 --- a/xs.h +++ b/xs.h @@ -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); } -- cgit v1.2.3