OSDN Git Service

Fix a bug introduced by commit 79c1a4f.
authorHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 19 Aug 2012 10:18:54 +0000 (19:18 +0900)
committerHironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
Sun, 19 Aug 2012 10:18:54 +0000 (19:18 +0900)
src/ltj-jfont.lua

index 9b791a6..59c8d5c 100644 (file)
@@ -61,7 +61,12 @@ function define_jfm(t)
               elseif type(w) == 'string' and utf.len(w)==1 then
                  real_char = true; w = utf.byte(w)
               elseif type(w) == 'string' and utf.len(w)==2 and utf.sub(w,2) == '*' then
-                 real_char = true; w = -utf.byte(utf.sub(w,1,1))
+                 real_char = true; w = utf.byte(utf.sub(w,1,1))
+                  if not t.chars[-w] then 
+                     t.chars[-w] = i
+                  else 
+                     defjfm_res= nil; return
+                  end
               end
               if not t.chars[w] then
                  t.chars[w] = i