From 48fa6408f09833129bf56e33bdb3aa949ca213aa Mon Sep 17 00:00:00 2001 From: leeight Date: Fri, 23 Sep 2011 22:39:17 +0800 Subject: FIX core dump issues and upgrade .gitignore --- tests/test_pinyin.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/test_pinyin.cpp') diff --git a/tests/test_pinyin.cpp b/tests/test_pinyin.cpp index 31aec84..5fe97ee 100644 --- a/tests/test_pinyin.cpp +++ b/tests/test_pinyin.cpp @@ -37,8 +37,13 @@ int main(int argc, char * argv[]){ linebuf[strlen(linebuf) - 1] = '\0'; } - if ( strcmp ( linebuf, "quit" ) == 0) + if ( strcmp ( linebuf, "quit" ) == 0) { break; + } + + if (linebuf[0] == '\0') { + continue; + } pinyin_parse_more_full_pinyins(instance, linebuf); pinyin_guess_sentence(instance); -- cgit