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

wxrc: GetInternalFileName: Call to Printf: Format string arg is now constant. #24547

Conversation

DoctorNoobingstoneIPresume

In the original code:

s.Printf(wxFileNameFromPath(parOutput) + wxT("$%03i-") + name2, i);

if wxFileNameFromPath(parOutput2) or name2 had contained '%' (format specifiers), the results would have been bad.

These strings are now given as additional arguments to Printf (corresponding to "%s" format specifiers),
and the format string argument itself is now constant.

This is a replacement of 9a5d32d as per #24437 (comment).

…ow constant.

In the original code:

```
s.Printf(wxFileNameFromPath(parOutput) + wxT("$%03i-") + name2, i);
```

if `wxFileNameFromPath(parOutput2)` or `name2` had contained `'%'` (format specifiers),
the results would have been bad.

These strings are now given as additional arguments to `Printf`
(corresponding to `"%s"` format specifiers),
and the format string argument itself is now constant.
@vadz
Copy link
Contributor

vadz commented May 22, 2024

Applying as well, thanks!

@vadz vadz closed this in a01c470 May 22, 2024
@DoctorNoobingstoneIPresume
Copy link
Author

You are most welcome, thank you for this and for all your work !! 🌈

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.

None yet

2 participants