Skip to content

Commit

Permalink
Update pinyin.c
Browse files Browse the repository at this point in the history
  • Loading branch information
duguying committed Dec 24, 2013
1 parent c647ecb commit 520d7eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pinyin/pinyin.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ i_HashTable* pinyin_init(){
*/
char* pinyin_get(char* cn){
char cnc[3];
memset(cnc,0,sizeof(char)*);
memset(cnc,0,sizeof(char)*3);
strncpy(cnc,cn,2);
return (char*)ht_lookup(&dict, cn)->nValue;
}
Expand All @@ -65,4 +65,4 @@ char* pinyin_get(char* cn){
*/
void pinyin_destroy(){
ht_release(&dict);
}
}

0 comments on commit 520d7eb

Please sign in to comment.