From 88c8e30220079c10246f8f496aff601587596176 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 18 Dec 2020 14:01:00 +0100 Subject: [PATCH] :bug: Fix jumps --- src/emit/emit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emit/emit.c b/src/emit/emit.c index 42231c90..65691ec3 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1517,8 +1517,8 @@ ANN static inline m_bool emit_jump_index(const Emitter emit, const Vector v, con m_int idx = 1; for(m_uint i = sz; --i > 1;) { if(!vector_at(v, i) && ++idx == n) { - m_uint *data = v->ptr + OFFSET + i*SZ_INT; - memcpy(data + SZ_INT, data, (sz-i) * SZ_INT); + m_uint *data = v->ptr + OFFSET + i; + memmove(data + 1, data, (sz-i) * SZ_INT); const Instr instr = emit_add_instr(emit, Goto); VPTR(v, i-1) = (m_uint)instr; return GW_OK; -- 2.43.0