OSDN Git Service

fix memory leak of luatexja.jfont.append_italic()
[luatex-ja/luatexja.git] / src / ltj-lineskip.lua
index f8b97c1..ba08285 100644 (file)
@@ -78,6 +78,7 @@ local p_dummy = ltjl.p_dummy
 local make_dir_whatsit = luatexja.direction.make_dir_whatsit
 local get_dir_count = luatexja.direction.get_dir_count
 local node_write = node.direct.write
+local tex_nest = tex.nest
 
 local function dir_adjust_append_vlist(b, loc, prev, mirrored)
    local old_b = to_direct(b)
@@ -87,7 +88,7 @@ local function dir_adjust_append_vlist(b, loc, prev, mirrored)
       local bw = texget('baselineskip', false)
       local normal = bw - prev - getfield(new_b, mirrored and 'depth' or 'height')
       local lmin, adj = nil, 0
-      local tail = to_direct(tex.nest[tex.nest.ptr].tail)
+      local tail = to_direct(tex_nest[tex_nest.ptr].tail)
       if p_dummy~=ltj_profiler then
          while tail and (id_glue<=getid(tail)) and (getid(tail)<=id_penalty) do
             tail = node_prev(tail)