From 902f76d1faf310f855a65c81d27c90804c433c4e Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 15 Dec 2018 19:31:42 -0500 Subject: [PATCH] more win32 gui fuzzer work --- include/extern.h | 1 + include/func_tab.h | 1 - win/win32/mhdlg.c | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/extern.h b/include/extern.h index 34feb78e3..67a3d0d0e 100644 --- a/include/extern.h +++ b/include/extern.h @@ -175,6 +175,7 @@ E boolean NDECL(status_hilite_menu); E char NDECL(randomkey); E void FDECL(random_response, (char *, int)); +E int NDECL(rnd_extcmd_idx); E int NDECL(doconduct); E int NDECL(domonability); E char FDECL(cmd_from_func, (int NDECL((*)))); diff --git a/include/func_tab.h b/include/func_tab.h index 9747253e1..79daef1de 100644 --- a/include/func_tab.h +++ b/include/func_tab.h @@ -22,6 +22,5 @@ struct ext_func_tab { }; extern struct ext_func_tab extcmdlist[]; -extern int extcmdlist_length; #endif /* FUNC_TAB_H */ diff --git a/win/win32/mhdlg.c b/win/win32/mhdlg.c index 34d5ce299..51134332c 100644 --- a/win/win32/mhdlg.c +++ b/win/win32/mhdlg.c @@ -168,7 +168,7 @@ int mswin_ext_cmd_window(int *selection) { if (iflags.debug_fuzzer) { - *selection = rn2(extcmdlist_length + 1) - 1; + *selection = rnd_extcmd_idx(); if (*selection != -1) return IDOK; -- 2.40.0