[syslinux] boot... round 2

Gene Cumm gene.cumm at gmail.com
Fri Jul 3 03:28:21 PDT 2015


On Fri, Jul 3, 2015 at 12:50 AM, poma via Syslinux <syslinux at zytor.com> wrote:

> - "unsigned char c;" does not solve the problem
>
> - "c >= 0 && c <= ' '" solves the problem for the current git

Could you try the following patch?  Feel free to only apply the change
to readconfig.c if you want.

-- 
-Gene


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 257b042..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;


More information about the Syslinux mailing list