Console-Docs icon indicating copy to clipboard operation
Console-Docs copied to clipboard

GetConsoleTitle documented behavior does not match what it does

Open DiaperGlu opened this issue 2 years ago • 0 comments

[Enter feedback here] GetConsoleTitleA returns 0 if the returned string does not fit in the buffer. (This means you can't pass in an empty buffer to get the length of the string.) GetConsoleTitleA returns the length of the string not including the null terminator if it exactly fits in the buffer without the null terminator. (This means there is no null terminator at the end of the string for this case.) GetConsoleTitleA returns the length of the string not including the null terminator if the null terminator does fit into the buffer.

Behavior tested on Windows 10 Home

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

DiaperGlu avatar Jul 22 '22 13:07 DiaperGlu