slackbuilds_ponce/desktop/gmrun/patches/10-escaping.patch
Edinaldo P.Silva e3a478c576 desktop/gmrun: New maintainer + add manpage & patches.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
2017-03-10 09:50:48 +00:00

23 lines
658 B
Diff

# Description: Correct escaping of characters
# Author: Luca Bedogni <me@lucabedogni.it>
Index: gmrun-0.9.2/src/gtkcompletionline.cc
===================================================================
--- gmrun-0.9.2.orig/src/gtkcompletionline.cc 2010-02-03 12:30:02.239774762 +0800
+++ gmrun-0.9.2/src/gtkcompletionline.cc 2010-02-03 12:30:24.983767847 +0800
@@ -226,12 +226,9 @@
const char* i = str.c_str();
while (*i) {
char c = *i++;
- switch (c) {
- case ' ':
- res += '\\';
- default:
- res += c;
- }
+ if (c == ' ' || c == '(' || c == ')' || c =='\'')
+ res += '\\';
+ res += c;
}
return res;
}