diff options
Diffstat (limited to 'com32/menu')
-rw-r--r-- | com32/menu/Makefile | 8 | ||||
-rw-r--r-- | com32/menu/menumain.c | 2 | ||||
-rw-r--r-- | com32/menu/readconfig.c | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/com32/menu/Makefile b/com32/menu/Makefile index 2a032728..b67b997d 100644 --- a/com32/menu/Makefile +++ b/com32/menu/Makefile @@ -15,9 +15,9 @@ ## topdir = ../.. -include ../MCONFIG +MAKEDIR = $(topdir)/mk +include $(MAKEDIR)/com32.mk -LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC) LNXLIBS = ../libutil/libutil_lnx.a MODULES = menu.c32 vesamenu.c32 @@ -28,10 +28,10 @@ COMMONOBJS = menumain.o readconfig.o passwd.o drain.o printmsg.o colors.o \ all: $(MODULES) $(TESTFILES) -menu.elf : menu.o $(COMMONOBJS) $(LIBS) $(C_LIBS) +menu.elf : menu.o $(COMMONOBJS) $(C_LIBS) $(LD) $(LDFLAGS) -o $@ $^ -vesamenu.elf : vesamenu.o $(COMMONOBJS) $(LIBS) $(C_LIBS) +vesamenu.elf : vesamenu.o $(COMMONOBJS) $(C_LIBS) $(LD) $(LDFLAGS) -o $@ $^ tidy dist: diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c index 5b3f6bd1..8573901c 100644 --- a/com32/menu/menumain.c +++ b/com32/menu/menumain.c @@ -806,7 +806,7 @@ static const char *run_menu(void) while (entry < cm->nentries && is_disabled(cm->menu_entries[entry])) entry++; } - if (entry >= cm->nentries) { + if (entry >= cm->nentries - 1) { entry = cm->nentries - 1; while (entry > 0 && is_disabled(cm->menu_entries[entry])) entry--; diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c index 0ac2564a..431017f6 100644 --- a/com32/menu/readconfig.c +++ b/com32/menu/readconfig.c @@ -392,7 +392,9 @@ static void record(struct menu *m, struct labeldata *ld, const char *append) break; } - if (ld->menudefault && me->action == MA_CMD) + if (ld->menudefault && (me->action == MA_CMD || + me->action == MA_GOTO || + me->action == MA_GOTO_UNRES)) m->defentry = m->nentries - 1; } |