[glibmm: 1/2] fix ustring::insert(iterator, In, In)



commit c66533c6494b313635d4b658d2add462cd45b372
Author: Thomas Holder <thomas holder schrodinger com>
Date:   Thu Nov 14 13:57:25 2019 +0100

    fix ustring::insert(iterator, In, In)

 glib/glibmm/ustring.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h
index 1ce7e979..562153fe 100644
--- a/glib/glibmm/ustring.h
+++ b/glib/glibmm/ustring.h
@@ -1129,7 +1129,8 @@ template <class In>
 void
 ustring::insert(ustring::iterator p, In pbegin, In pend)
 {
-  string_.insert(p.base(), Glib::ustring::SequenceToString<In>(pbegin, pend));
+  size_type pos = p.base() - string_.begin();
+  string_.insert(pos, Glib::ustring::SequenceToString<In>(pbegin, pend));
 }
 
 template <class In>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]