Skip to content
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

Windows: Fix rare argument parsing bug #680

Merged
merged 2 commits into from
May 19, 2024
Merged

Conversation

jdpurcell
Copy link
Contributor

@jdpurcell jdpurcell commented May 14, 2024

Fixes #679. See explanation in the code comments. The bug comes from Qt's code here and here. I borrowed this for the fix, which is how Qt does it if it doesn't detect "modified" arguments.

Initially I tried simply setting argc = __argc and argv = __argv at the top of main, which worked great on the 64-bit Qt 6 build, but it crashed the 32-bit Qt 5 build if the weird unicode character was involved.

EDIT: I reported this as QTBUG-125380, by the way.

@jurplel
Copy link
Owner

jurplel commented May 19, 2024

This is insane
(amazing work)

@jurplel jurplel merged commit bd62c7c into jurplel:master May 19, 2024
6 checks passed
@jdpurcell jdpurcell deleted the issue679 branch June 29, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

qView does not open the image if there is a "special" character in the path
2 participants