File scim-skk-iter-remove-fix.diff of Package scim-skk

---
 src/scim_skk_dictionary.cpp |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/src/scim_skk_dictionary.cpp
+++ b/src/scim_skk_dictionary.cpp
@@ -543,10 +543,12 @@
 UserDict::write (const WideString &key, const CandPair &data)
 {
     list<CandPair> &cl = m_dictdata[key];
-    for (list<CandPair>::iterator it = cl.begin(); it != cl.end(); it++) {
+    for (list<CandPair>::iterator it = cl.begin(); it != cl.end(); ) {
         if (it->first == data.first) {
             cl.erase(it);
-        }
+        } else {
+	    it++;
+	}
     }
     cl.push_front(data);
     m_writeflag = true;
openSUSE Build Service is sponsored by