diff --git a/honoka/plugins/romkan.cpp b/honoka/plugins/romkan.cpp index fd1dc8c..fed1010 100644 --- a/honoka/plugins/romkan.cpp +++ b/honoka/plugins/romkan.cpp @@ -524,6 +524,7 @@ } } + if (!hookp.length()) return false; if ((buf.length() < hookp.length()) || (!hookp.length())) return false; else if (buf.substr(0,hookp.length()) == hookp) { return inputEvent(key); @@ -606,6 +607,7 @@ if ((key.code == SCIM_KEY_Return) || (key.code == SCIM_KEY_Linefeed) || (key.code == SCIM_KEY_Tab)) return false; + if (!isprint(key.get_ascii_code())) return false; insert(key.get_ascii_code()); return true; }