Commit a46f311f authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

cmd: Use the ARRAY_SIZE() macro.

parent f051aa67
......@@ -2419,9 +2419,9 @@ int wmain (int argc, WCHAR *argvW[])
OSVERSIONINFOW osv;
char osver[50];
if (!GetEnvironmentVariableW(comspecW, comspec, sizeof(comspec)/sizeof(WCHAR)))
if (!GetEnvironmentVariableW(comspecW, comspec, ARRAY_SIZE(comspec)))
{
GetSystemDirectoryW(comspec, (sizeof(comspec) - sizeof(cmdW))/sizeof(WCHAR));
GetSystemDirectoryW(comspec, ARRAY_SIZE(comspec) - ARRAY_SIZE(cmdW));
strcatW(comspec, cmdW);
SetEnvironmentVariableW(comspecW, comspec);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment