Browse Source

EventMessageFile should be unquoted.

We were writing a quoted message source path to the registry.
Stefan and Michael Scherer point out that it should be unquoted.
Iain Patterson 5 years ago
parent
commit
7f60a4c99c
2 changed files with 2 additions and 1 deletions
  1. 1 0
      README.txt
  2. 1 1
      registry.cpp

+ 1 - 0
README.txt

@@ -879,6 +879,7 @@ the registry for parameters.
 Thanks to Gerald Haider for noticing that installing a service with NSSM in a
 path containing spaces was technically a security vulnerability.
 Thanks to Scott Ware for reporting a crash saving the environment on XP 32-bit.
+Thanks to Stefan and Michael Scherer for reporting a bug writing the event messages source.
 
 Licence
 -------

+ 1 - 1
registry.cpp

@@ -50,7 +50,7 @@ int create_messages() {
   }
 
   /* Get path of this program */
-  const TCHAR *path = nssm_imagepath();
+  const TCHAR *path = nssm_unquoted_imagepath();
 
   /* Try to register the module but don't worry so much on failure */
   RegSetValueEx(key, _T("EventMessageFile"), 0, REG_SZ, (const unsigned char *) path, (unsigned long) (_tcslen(path) +  1) * sizeof(TCHAR));