| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9b44c56 commit 4bad757
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,18 +28,18 @@ | |||
| 28 | 28 | #include <WinError.h> | |
| 29 | 29 | ||
| 30 | 30 | #define SKIP_CHECK_VAR "NODE_SKIP_PLATFORM_CHECK" | |
| 31 | - #define SKIP_CHECK_SIZE 1 | ||
| 32 | 31 | #define SKIP_CHECK_VALUE "1" | |
| 32 | + #define SKIP_CHECK_STRLEN (sizeof(SKIP_CHECK_VALUE) - 1) | ||
| 33 | 33 | ||
| 34 | 34 | int wmain(int argc, wchar_t* wargv[]) { | |
| 35 | 35 | // Windows Server 2012 (not R2) is supported until 10/10/2023, so we allow it | |
| 36 | 36 | // to run in the experimental support tier. | |
| 37 | - char buf[SKIP_CHECK_SIZE + 1]; | ||
| 37 | + char buf[SKIP_CHECK_STRLEN + 1]; | ||
| 38 | 38 | if (!IsWindows8Point1OrGreater() && | |
| 39 | 39 | !(IsWindowsServer() && IsWindows8OrGreater()) && | |
| 40 | 40 | (GetEnvironmentVariableA(SKIP_CHECK_VAR, buf, sizeof(buf)) != | |
| 41 | - SKIP_CHECK_SIZE || | ||
| 42 | - strncmp(buf, SKIP_CHECK_VALUE, SKIP_CHECK_SIZE + 1) != 0)) { | ||
| 41 | + SKIP_CHECK_STRLEN || | ||
| 42 | + strncmp(buf, SKIP_CHECK_VALUE, SKIP_CHECK_STRLEN) != 0)) { | ||
| 43 | 43 | fprintf(stderr, "Node.js is only supported on Windows 8.1, Windows " | |
| 44 | 44 | "Server 2012 R2, or higher.\n" | |
| 45 | 45 | "Setting the " SKIP_CHECK_VAR " environment variable " | |
| Back | FazBrowse Home | New Git URL |
0 commit comments