summaryrefslogtreecommitdiffstats
path: root/src/pinyin.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-06-18 16:53:00 +0800
committerPeng Wu <alexepico@gmail.com>2012-06-18 16:53:00 +0800
commit4ab6c605831fc0bb05b1face2a02667f5fdab0c7 (patch)
tree80a6949c2bfc563ee5f7b65a780a47dc0491355a /src/pinyin.cpp
parent9aaa1b504a366d5b13b138c44ed696306d4107b2 (diff)
downloadlibpinyin-4ab6c605831fc0bb05b1face2a02667f5fdab0c7.tar.gz
libpinyin-4ab6c605831fc0bb05b1face2a02667f5fdab0c7.tar.xz
libpinyin-4ab6c605831fc0bb05b1face2a02667f5fdab0c7.zip
fixes crash
Diffstat (limited to 'src/pinyin.cpp')
-rw-r--r--src/pinyin.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index c3050a3..2bf3b89 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -84,10 +84,12 @@ static bool check_format(const char * userdir){
if (NULL == phrasefilename)
continue;
+#if 0
/* remove bin file. */
gchar * filename = g_build_filename(userdir, phrasefilename, NULL);
unlink(filename);
g_free(filename);
+#endif
gchar * dbinfilename = get_dbin_filename(phrasefilename);
@@ -214,8 +216,8 @@ bool pinyin_load_phrase_library(pinyin_context_t * context,
g_free(dbinfilename);
MemoryChunk * log = new MemoryChunk;
- log->load(dbinfilename);
- g_free(dbinfilename);
+ log->load(chunkfilename);
+ g_free(chunkfilename);
/* merge the chunk log. */
context->m_phrase_index->merge(index, log);