From f975e644fb5c4e4dff4d9872b60e7467528e779f Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sun, 6 Aug 2017 22:55:53 +0200 Subject: Fix "Save as..." and other menu entries in GTK unescape has a bug causing unescape(escape(id)) == id to fail --- src/gui_gtk.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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('.'); -- cgit v1.2.3-70-g09d2