8000 Forward command line arguments for window launchers by firai · Pull Request #1572 · winpython/winpython · GitHub
[go: up one dir, main page]

Skip to content

Forward command line arguments for window launchers #1572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 8, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove extra space from argument
  • Loading branch information
firai authored Apr 25, 2025
commit 85d0e85c1024c10cdb429a4ec216d29b69ff6301
4 changes: 2 additions & 2 deletions portable/launchers_src/launcher_template_WINDOWS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ int WINAPI WinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/, LPSTR /
if (commandLine[0] == L'"') {
LPWSTR closingQuote = wcschr(commandLine + 1, L'"');
if (closingQuote) {
args = closingQuote + 1; // Skip closing quote and space
args = closingQuote + 2; // Skip closing quote and space
}
// Otherwise skip to first space
} else {
LPWSTR spacePos = wcschr(commandLine, L' ');
if (spacePos) {
args = spacePos + 1; // Skip space
args = spacePos + 2; // GetCommandLineW puts 2 spaces when path isn't double quoted
}
}
}
Expand Down
0