-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix incorrect format string arguments #67464
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1138,7 +1138,7 @@ void EEResourceException::GetMessage(SString &result) | |||||
| // since we don't want to call managed code here. | ||||||
| // | ||||||
|
|
||||||
| result.Printf("%s (message resource %s)", | ||||||
| result.Printf("%s (message resource %S)", | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
This may fix the test failure. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! Was using this as a good excuse to learn how to use runfo. 😊 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The stack trace shows that the failure is this line: - strArgument.Printf(W("0x%x"), pInstruction->uArg);
+ strArgument.Printf(W("0x%zx"), pInstruction->uArg);But since I'm pretty sure that in context, this value always fits into 32 bits anyway, so maybe the answer is simply to cast back to uint32 and leave the original format string as-is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The assert says that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Edit: Looks like we'd need some more generalized cleanup throughout this if we wanted to support standard syntaxes. I'll just use I for now since it doesn't add much debt to what's already there. |
||||||
| CoreLibBinder::GetExceptionName(m_kind), m_resourceName.GetUnicode()); | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.