summary refs log tree commit diff
path: root/pkgs/os-specific/linux/syslinux/gcc5-fix.patch
blob: dc44b18805839df2d067806844b76f1e4cfd2f72 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/com32/include/menu.h b/com32/include/menu.h
index bc0182f..b0251e4 100644
--- a/com32/include/menu.h
+++ b/com32/include/menu.h
@@ -195,7 +195,7 @@ void local_cursor_enable(bool);
 
 static inline int my_isspace(char c)
 {
-    return (unsigned char)c <= ' ';
+    return (unsigned char)c <= ' ' || (unsigned char)c == '\x7f';
 }
 
 int my_isxdigit(char c);
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c
index b7814be..a433fad 100644
--- a/com32/menu/readconfig.c
+++ b/com32/menu/readconfig.c
@@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
     char c;
 
     while ((c = *src++)) {
-	if (c <= ' ' && c == '\x7f') {
+	if (my_isspace(c)) {
 	    if (!was_space)
 		*dst++ = '_';
 	    was_space = true;