diff options
-rw-r--r-- | libbb/appletlib.c | 2 | ||||
-rw-r--r-- | win32/mingw.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 121959376..54be59f2d 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -1352,7 +1352,7 @@ int main(int argc UNUSED_PARAM, char **argv) | |||
1352 | 1352 | ||
1353 | /* Have this process handle critical errors itself: the default | 1353 | /* Have this process handle critical errors itself: the default |
1354 | * system-generated error dialogs may be inconvenient. */ | 1354 | * system-generated error dialogs may be inconvenient. */ |
1355 | change_critical_error_dialogs(getenv(BB_CRITICAL_ERROR_DIALOGS) ?: ""); | 1355 | change_critical_error_dialogs(getenv(BB_CRITICAL_ERROR_DIALOGS)); |
1356 | #endif | 1356 | #endif |
1357 | 1357 | ||
1358 | #if defined(__MINGW64_VERSION_MAJOR) | 1358 | #if defined(__MINGW64_VERSION_MAJOR) |
diff --git a/win32/mingw.c b/win32/mingw.c index 6ad514ad4..467e4a33d 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -2513,5 +2513,6 @@ windows_env(void) | |||
2513 | void FAST_FUNC | 2513 | void FAST_FUNC |
2514 | change_critical_error_dialogs(const char *newval) | 2514 | change_critical_error_dialogs(const char *newval) |
2515 | { | 2515 | { |
2516 | SetErrorMode(strcmp(newval, "1") == 0 ? 0 : SEM_FAILCRITICALERRORS); | 2516 | SetErrorMode(newval && newval[0] == '1' && newval[1] == '\0' ? |
2517 | 0 : SEM_FAILCRITICALERRORS); | ||
2517 | } | 2518 | } |