bpo-30291 Changes to launcher so as to allow py -3-32,... by GadgetSteve · Pull Request #1488 · python/cpython

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're not requiring a major version -- just skipping leading digits. What if the version string is ".7-32"? ISTM, you should initially set BOOL result = p && isdigit(*p); . Then you can skip remaining digits.

Also, this should be calling iswdigit. The debug CRT raises an exception if isdigit is passed a value greater than 255. As things stand I think py.exe always links statically with a non-debug implementation, but it's still not a good practice to use isdigit with 16-bit wchar_t values.