diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp index 36e65c78ad6f..d839060f9752 100644 --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -7133,7 +7133,7 @@ PreInit() { #ifdef XP_WIN const char* crash_option = getenv("XRE_NO_WINDOWS_CRASH_DIALOG"); - if (crash_option && strncmp(crash_option, "1", 1)) { + if (crash_option && crash_option[0] == '1') { // Disable the segfault dialog. We want to fail the tests immediately // instead of hanging automation. UINT newMode = SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX;