Commits

Vinay Sajip committed 5f5925a

Shebang-processing whitespace handling changed.

  • Participants
  • Parent commits 0d1e0e4

Comments (0)

Files changed (1)

CLILauncher/launcher.c

     DWORD read;
     wchar_t * key;
     COMMAND * cp;
+    wchar_t * cmdp;
 
     read = GetPrivateProfileStringW(L"commands", NULL, NULL, keynames, MSGSIZE,
                                     config_path);
             debug(L"read_commands: %s: not enough space for %s\n",
                   config_path, key);
         }
-        cp = find_command(key);
-        if (cp == NULL)
-            add_command(key, value);
-        else
-            update_command(cp, key, value);
+        cmdp = skip_whitespace(value);
+        if (*cmdp) {
+            cp = find_command(key);
+            if (cp == NULL)
+                add_command(key, value);
+            else
+                update_command(cp, key, value);
+        }
         key += wcslen(key) + 1;
     }
 }
     }
 
     command = skip_me(GetCommandLineW());
+    debug(L"Called with command line: %s", command);
     if (argc <= 1) {
         valid = FALSE;
         p = NULL;