From: Jérémie Astor Date: Fri, 18 Dec 2020 13:01:00 +0000 (+0100) Subject: :bug: Fix jumps X-Git-Tag: nightly~1091 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=88c8e30220079c10246f8f496aff601587596176;p=gwion.git :bug: Fix jumps --- 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;