Explorar o código

Fixed srvany-compatible environment checkbox.

The checkbox was inverted.  If we were replacing the environment, like
srvany does, it was unchecked, suggesting that the environment would be
appended.
Iain Patterson %!s(int64=11) %!d(string=hai) anos
pai
achega
2e2d1245db
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      gui.cpp

+ 1 - 1
gui.cpp

@@ -136,13 +136,13 @@ int nssm_gui(int resource, nssm_service_t *service) {
     TCHAR *env;
     unsigned long envlen;
     if (service->env_extralen) {
-      SendDlgItemMessage(tablist[NSSM_TAB_ENVIRONMENT], IDC_ENVIRONMENT_REPLACE, BM_SETCHECK, BST_CHECKED, 0);
       env = service->env_extra;
       envlen = service->env_extralen;
     }
     else {
       env = service->env;
       envlen = service->envlen;
+      if (envlen) SendDlgItemMessage(tablist[NSSM_TAB_ENVIRONMENT], IDC_ENVIRONMENT_REPLACE, BM_SETCHECK, BST_CHECKED, 0);
     }
 
     if (envlen) {