X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=registry.cpp;h=158158d4f1e559eb6eccd5fadc899845085a8c61;hb=2994e17c24d8a3d32937a92733ba1ee0f26dc33d;hp=0cb552f2e1f05048f8be0644592b50e72d45ddec;hpb=bef1f20a0b637d31c32dd0ad90bab8f7514e665c;p=nssm.git diff --git a/registry.cpp b/registry.cpp index 0cb552f..158158d 100644 --- a/registry.cpp +++ b/registry.cpp @@ -17,7 +17,7 @@ int create_messages() { } /* Get path of this program */ - TCHAR path[MAX_PATH]; + TCHAR path[PATH_LENGTH]; GetModuleFileName(0, path, _countof(path)); /* Try to register the module but don't worry so much on failure */ @@ -609,7 +609,7 @@ int get_parameters(nssm_service_t *service, STARTUPINFO *si) { if (get_number(key, NSSM_REG_ROTATE_BYTES_HIGH, &service->rotate_bytes_high, false) != 1) service->rotate_bytes_high = 0; /* Change to startup directory in case stdout/stderr are relative paths. */ - TCHAR cwd[MAX_PATH]; + TCHAR cwd[PATH_LENGTH]; GetCurrentDirectory(_countof(cwd), cwd); SetCurrentDirectory(service->dir);