-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Don't printf wstring_views by copying them into wstrings; use %.*s! #4027
Copy link
Copy link
Open
Labels
Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Help WantedWe encourage anyone to jump in on these.We encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.It's a feature request, but it doesn't really need a major design.Product-ConhostFor issues in the Console codebaseFor issues in the Console codebaseProduct-TerminalThe new Windows Terminal.The new Windows Terminal.
Milestone
Metadata
Metadata
Assignees
Labels
Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Help WantedWe encourage anyone to jump in on these.We encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.It's a feature request, but it doesn't really need a major design.Product-ConhostFor issues in the Console codebaseFor issues in the Console codebaseProduct-TerminalThe new Windows Terminal.The new Windows Terminal.
StringCchPrintfand--since C99--printfsupport a specifier that indicates that a string is counted:The
.*suggests that printf should consume one register-width argument to determine how many characters the string that follows contains instead of waiting for a null terminator.