[med-svn] [aghermann] 10/23: work around non-utf8 terminating \0, unbreak lua scripts loading in rk1968
andrei zavada
hmmr-guest at moszumanska.debian.org
Wed Jan 4 22:59:25 UTC 2017
This is an automated email from the git hooks/post-receive script.
hmmr-guest pushed a commit to tag 1.1.2
in repository aghermann.
commit 2f6c5f8ef3bc68fda90ade98250779de88ff320e
Author: Andrei Zavada <hmmr at frdg>
Date: Tue Jan 3 05:46:52 2017 +0200
work around non-utf8 terminating \0, unbreak lua scripts loading in rk1968
---
upstream/src/aghermann/ui/ui++.hh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/upstream/src/aghermann/ui/ui++.hh b/upstream/src/aghermann/ui/ui++.hh
index 6827ed8..51a3e28 100644
--- a/upstream/src/aghermann/ui/ui++.hh
+++ b/upstream/src/aghermann/ui/ui++.hh
@@ -245,7 +245,10 @@ SUIVar_<GtkEntry, string>::down() const { v->assign( gtk_entry_get_text(
template <> inline void
SUIVar_<GtkTextBuffer, string>::up() const
{
- gtk_text_buffer_set_text( w, v->c_str(), -1);
+ // v->c_str() fails g_utf8_validate. It has a non-utf8 terminating \0, apparently.
+ gchar* s2 = g_strdup(v->c_str());
+ gtk_text_buffer_set_text( w, s2, v->size());
+ g_free(s2);
}
template <> inline void
SUIVar_<GtkTextBuffer, string>::down() const
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git
More information about the debian-med-commit
mailing list