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



commit ebfda42fe98dbbb39165228689c7c5eec5ae2627
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 6282dce1..834bdaa1 100644
--- a/glib/glibmm/ustring.h
+++ b/glib/glibmm/ustring.h
@@ -1223,7 +1223,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]