From 14e51376ea1d4c3888ea820b17f774a474e42504 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 7 Nov 2022 20:38:37 +0000 Subject: win32: fix ESC/CR handling in 'make menuconfig' The WIN32 code in the 'mconf' build program should truncate the exit status from dialogs as if it were passed through WEXITSTATUS. The text dialog, for example, returns a status of -1 when ESC or CR is pressed. 'mconf' expects to see this as 255. --- scripts/kconfig/mconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 1112daa56..62baa82b0 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -694,7 +694,7 @@ static int exec_conf(void) WaitForSingleObject(piProcInfo.hProcess, INFINITE); GetExitCodeProcess(piProcInfo.hProcess, &stat); - return (int)stat; + return (int)(stat &0xff); #else int pipefd[2], stat, size; sigset_t sset, osset; -- cgit v1.2.3-55-g6feb