diff options
author | Gene Cumm <gene.cumm@gmail.com> | 2013-06-23 23:30:51 -0400 |
---|---|---|
committer | Gene Cumm <gene.cumm@gmail.com> | 2013-06-23 23:30:51 -0400 |
commit | 98d7a252247750eccea9cf32df37afbad3e4c7b1 (patch) | |
tree | 181c537d2822b0447e0ca7d743d95cf3e53ea985 | |
parent | 022cdd1d56512e8759e8374c10a7420201db93c0 (diff) | |
download | syslinux-98d7a252247750eccea9cf32df37afbad3e4c7b1.tar.gz syslinux-98d7a252247750eccea9cf32df37afbad3e4c7b1.tar.xz syslinux-98d7a252247750eccea9cf32df37afbad3e4c7b1.zip |
menu.c32: Fix SYSAPPEND
Using the SYSAPPEND directive would examine "D" instead of the
value after the directive. Also allows a 1-step switch to strtol()
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
-rw-r--r-- | com32/menu/readconfig.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c index 7eaea280..adec8a7d 100644 --- a/com32/menu/readconfig.c +++ b/com32/menu/readconfig.c @@ -1044,11 +1044,13 @@ do_include: m->ontimeout = refstrdup(skipspace(p + 9)); } else if (looking_at(p, "allowoptions")) { m->allowedit = !!atoi(skipspace(p + 12)); - } else if (looking_at(p, "ipappend") || looking_at(p, "sysappend")) { + } else if ((ep = looking_at(p, "ipappend")) || + (ep = looking_at(p, "sysappend"))) { + uint32_t s = atoi(skipspace(ep)); if (ld.label) - ld.ipappend = atoi(skipspace(p + 8)); + ld.ipappend = s; else - ipappend = atoi(skipspace(p + 8)); + ipappend = s; } else if (looking_at(p, "default")) { refstr_put(globaldefault); globaldefault = refstrdup(skipspace(p + 7)); |