Fixes crash
This commit is contained in:
parent
1edc10f0f8
commit
86aa9090b8
@ -0,0 +1,29 @@
|
||||
From e94fe7e9209ce7bc53afb8095ea27a36d3293616 Mon Sep 17 00:00:00 2001
|
||||
From: Peng Wu <alexepico@gmail.com>
|
||||
Date: Fri, 4 Dec 2015 14:15:02 +0800
|
||||
Subject: [PATCH] fixes getCursorRight method
|
||||
|
||||
---
|
||||
src/ZYZPhoneticEditor.cc | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/ZYZPhoneticEditor.cc b/src/ZYZPhoneticEditor.cc
|
||||
index 74c7d70..62e9c59 100644
|
||||
--- a/src/ZYZPhoneticEditor.cc
|
||||
+++ b/src/ZYZPhoneticEditor.cc
|
||||
@@ -728,6 +728,12 @@ PhoneticEditor::getCursorRight (void)
|
||||
size_t index = 0;
|
||||
size_t start_pos = 0, end_pos = 0;
|
||||
|
||||
+ size_t total_length = get_enhanced_text_length (enhanced_text);
|
||||
+
|
||||
+ /* near the end of enhanced text length. */
|
||||
+ if (m_cursor + 1 >= total_length)
|
||||
+ return total_length;
|
||||
+
|
||||
probe_section_start (enhanced_text, m_cursor,
|
||||
cursor, index, start_pos);
|
||||
|
||||
--
|
||||
2.5.0
|
||||
|
@ -1,8 +1,8 @@
|
||||
%global snapshot 0
|
||||
%global snapshot 1
|
||||
|
||||
Name: ibus-libzhuyin
|
||||
Version: 1.7.5
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: New Zhuyin engine based on libzhuyin for IBus
|
||||
License: GPLv2+
|
||||
URL: https://github.com/libzhuyin/ibus-libzhuyin
|
||||
@ -64,6 +64,9 @@ make install DESTDIR=${RPM_BUILD_ROOT} INSTALL="install -p"
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Dec 8 2015 Peng Wu <pwu@redhat.com> - 1.7.5-2
|
||||
- Fixes crash
|
||||
|
||||
* Thu Nov 19 2015 Peng Wu <pwu@redhat.com> - 1.7.5-1
|
||||
- Update to 1.7.5
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user