summaryrefslogtreecommitdiffstats
path: root/src/storage/table_info.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage/table_info.cpp')
-rw-r--r--src/storage/table_info.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/storage/table_info.cpp b/src/storage/table_info.cpp
index ff499b3..f496c7a 100644
--- a/src/storage/table_info.cpp
+++ b/src/storage/table_info.cpp
@@ -194,10 +194,9 @@ bool SystemTableInfo2::load(const char * filename) {
}
TABLE_PHONETIC_TYPE type = PINYIN_TABLE;
- char * str = NULL;
- num = fscanf(input, "source table format:%ms", &str);
+ char str[256];
+ num = fscanf(input, "source table format:%256s", str);
type = to_table_phonetic_type(str);
- free(str);
#if 0
printf("binver:%d modelver:%d lambda:%f\n", binver, modelver, lambda);