nixpkgs/pkgs/os-specific/linux/syslinux/gcc5-fix.patch

27 lines
769 B
Diff
Raw Normal View History

2015-07-07 00:49:07 +00:00
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;