]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
FFI: Fix symbol name redirection.
authorMike Pall <mike>
Thu, 27 Jan 2011 15:07:02 +0000 (16:07 +0100)
committerMike Pall <mike>
Thu, 27 Jan 2011 15:07:02 +0000 (16:07 +0100)
src/lj_cparse.c

index 925894a394a6174c425e89e950ff2c45c8b3363a..b2d0ecf75c1613a6b6447371581d14f531d0370f 100644 (file)
@@ -1762,6 +1762,7 @@ static void cp_decl_multi(CPState *cp)
        if (decl.redir) {  /* Add attribute for redirected symbol name. */
          CType *cta;
          CTypeID aid = lj_ctype_new(cp->cts, &cta);
+         ct = ctype_get(cp->cts, id);  /* Table may have been reallocated. */
          cta->info = CTINFO(CT_ATTRIB, CTATTRIB(CTA_REDIR));
          cta->sib = ct->sib;
          ct->sib = aid;