[luatex] Different behaviour beetween LuaTeX e Lua

Akira Kakuto kakuto at fuk.kindai.ac.jp
Sat May 27 07:26:40 CEST 2017


> Here it worked if I add a redundant one byte in LuaBasic.c:
>
> typedef struct {
>    LUA_NUMBER val[4]; 
> } matrix;

It is better to use your definition,

typedef struct {
   LUA_NUMBER val[3]; 
} matrix;

and change

val[X] ---> val[X-1]

below. For example,

for (i=1;i<4;i++)
{
     temp->val[i-1] = lua_tonumber(L,i);
}

Note that temp->val[3] was the cause of the crash.
You can write only on temp->val[0], temp->val[1], and temp->val[2].

Best,
Akira



More information about the luatex mailing list