summaryrefslogtreecommitdiffstats
path: root/src/storage/phrase_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage/phrase_index.cpp')
-rw-r--r--src/storage/phrase_index.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp
index 06b613f..36cb149 100644
--- a/src/storage/phrase_index.cpp
+++ b/src/storage/phrase_index.cpp
@@ -527,8 +527,13 @@ bool FacadePhraseIndex::load_text(guint8 phrase_index, FILE * infile,
phrase_token_t cur_token = 0;
while (!feof(infile)){
+#ifdef __APPLE__
+ int num = fscanf(infile, "%255s %255[^ \t] %u %ld",
+ pinyin, phrase, &token, &freq);
+#else
int num = fscanf(infile, "%255s %255s %u %ld",
pinyin, phrase, &token, &freq);
+#endif
if (4 != num)
continue;