summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-08-06 22:55:53 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-08-06 22:55:53 +0200
commitf975e644fb5c4e4dff4d9872b60e7467528e779f (patch)
treeec59cdab15c494925022f997c61e29a791b2fa12 /src
parentea8148077fa28964e3b582cd6e0bb9cfea850b66 (diff)
Fix "Save as..." and other menu entries in GTK
unescape has a bug causing unescape(escape(id)) == id to fail
Diffstat (limited to 'src')
-rw-r--r--src/gui_gtk.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui_gtk.cc b/src/gui_gtk.cc
index c02bdf6..9b6addc 100644
--- a/src/gui_gtk.cc
+++ b/src/gui_gtk.cc
@@ -2302,12 +2302,12 @@ std::string GtkGuiMenu::unescape(std::string const& action) {
std::string ret;
for (size_t i = 0; i < action.size(); ++i) {
if (action[i] != '.') continue;
+ ret.append(action, last, i - last);
++i;
if (i == action.size()) {
assert(false);
return "";
}
- ret.append(action, last, i - last);
if (action[i] == '.') {
last = i + 1;
ret.push_back('.');