OSDN Git Service

Fix a crash by "\ruby{Weierstraß}{ワイエルシュトラス}"
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 1 Jan 2019 07:43:00 +0000 (16:43 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Tue, 1 Jan 2019 07:43:00 +0000 (16:43 +0900)
src/ltj-ruby.lua

index 3dff4e6..6ab3d1c 100644 (file)
@@ -208,7 +208,7 @@ do
       local hh, hd = getfield(box, 'height'), getfield(box, 'depth')
       local hx = h
       while hx do
-         local hic = has_attr(hx, attr_icflag)
+         local hic = has_attr(hx, attr_icflag) or 0
         if (hic == KANJI_SKIP) or (hic == KANJI_SKIP_JFM)
             or (hic == XKANJI_SKIP) or (hic == XKANJI_SKIP_JFM)
             or ((hic<=FROM_JFM+63) and (hic>=FROM_JFM)) then