diff --git a/.gitignore b/.gitignore index 3171799..7015e1e 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /libpinyin-1.6.91.tar.gz /libpinyin-1.7.0.tar.gz /libpinyin-1.9.91.tar.gz +/libpinyin-1.9.92.tar.gz diff --git a/libpinyin-2.0.x-head.patch b/libpinyin-2.0.x-head.patch index 9861c80..e69de29 100644 --- a/libpinyin-2.0.x-head.patch +++ b/libpinyin-2.0.x-head.patch @@ -1,27 +0,0 @@ -diff --git a/src/include/memory_chunk.h b/src/include/memory_chunk.h -index 83b8ad9..044fa0d 100644 ---- a/src/include/memory_chunk.h -+++ b/src/include/memory_chunk.h -@@ -60,7 +60,7 @@ private: - char * m_allocated; //one data pass the end. - free_func_t m_free_func; - -- const guint32 header = sizeof(guint32) * 2; -+ const gint32 header = sizeof(guint32) * 2; - - private: - void freemem(){ -diff --git a/src/pinyin.cpp b/src/pinyin.cpp -index 1a5132e..57defcc 100644 ---- a/src/pinyin.cpp -+++ b/src/pinyin.cpp -@@ -1172,6 +1172,9 @@ bool pinyin_get_sentence(pinyin_instance_t * instance, - pinyin_context_t * & context = instance->m_context; - NBestMatchResults & results = instance->m_nbest_results; - -+ if (0 == results.size()) -+ return false; -+ - MatchResult result = NULL; - assert(index < results.size()); - assert(results.get_result(index, result)); diff --git a/libpinyin.spec b/libpinyin.spec index 898e0f8..fa2c7ae 100644 --- a/libpinyin.spec +++ b/libpinyin.spec @@ -1,8 +1,8 @@ -%global snapshot 1 +%global snapshot 0 Name: libpinyin -Version: 1.9.91 -Release: 2%{?dist} +Version: 1.9.92 +Release: 1%{?dist} Summary: Library to deal with pinyin License: GPLv3+ @@ -92,6 +92,10 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %changelog +* Tue Mar 7 2017 Peng Wu - 1.9.92-1 +- Update to 1.9.92 +- fixes crash + * Tue Feb 28 2017 Peng Wu - 1.9.91-2 - Fixes crash in Double Pinyin diff --git a/sources b/sources index 690b04f..fe7041e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libpinyin-1.9.91.tar.gz) = abbd549b146e8975c982f027f11989dedbfe9d7b84f67f56677df78f70e0330041795ea311ace91a35613ac3fec9e8eeaa5012aa80ec9892274ddf1674e2e5a4 +SHA512 (libpinyin-1.9.92.tar.gz) = 5406e9be320775315694c99ae801dd90ed82df7b12ad49f7637644df9f85ce15ef501d798e78f1fedbfdf15eb9ed4f227f65fad3edafd556579bddc7d837cc7c