Fix issue in 64 bits with overwriting enabled for buffer.
This commit is contained in:
1 parent
6b93d7644a
commit
aba1ac1646
1 file changed
+1
-1
+1
-1
@@ -262,7 +262,7 @@ M_C(name, _init)(buffer_t v, size_t size) \
|
||||
/* Compute the index of the last push element */ \
|
||||
idx--; \
|
||||
if (!BUFFERI_POLICY_P((policy), BUFFER_STACK)) { \
|
||||
idx = (idx == -1U) ? BUFFERI_SIZE(m_size)-1 : idx; \
|
||||
idx = idx >= BUFFERI_SIZE(m_size) ? BUFFERI_SIZE(m_size)-1 : idx; \
|
||||
} \
|
||||
/* Update data in the buffer */ \
|
||||
M_GET_SET oplist (v->data[idx], data); \
|
||||
|
||||
Reference in new issue
Block a user