update.
[chise/ruby.git] / ext / libchise_c.c
index 6f81fb4..1364381 100755 (executable)
@@ -169,6 +169,7 @@ static VALUE fccs_decode(VALUE obj, VALUE code_point){
   RB_CHISE_CCS *rccs;
   Data_Get_Struct(obj, RB_CHISE_CCS, rccs);
   CHISE_Char_ID cid = chise_ccs_decode(rccs->ccs, NUM2INT(code_point));
+  if (cid == -1) return Qnil;
   return INT2NUM(cid);
 }