Skip to content

fix error when UNICODE defined#49

Open
TheKrush wants to merge 2 commits into
tapio:masterfrom
TheKrush:master
Open

fix error when UNICODE defined#49
TheKrush wants to merge 2 commits into
tapio:masterfrom
TheKrush:master

Conversation

@TheKrush

Copy link
Copy Markdown

Code doesn't currently compile if UNICODE is defined, this fixes that

@nabijaczleweli

Copy link
Copy Markdown
Contributor

Hello Windows my old friend...

sigh 👍

@ardi69

ardi69 commented Jan 6, 2017

Copy link
Copy Markdown

a better choice (i think):

#ifdef UNICODE
		WriteConsoleOutputCharacterA(hConsoleOutput, str, len, csbi.dwCursorPosition, &numberOfCharsWritten);
#else // UNICODE
		WriteConsoleOutputCharacter(hConsoleOutput, str, len, csbi.dwCursorPosition, &numberOfCharsWritten);
#endif // UNICODE

@hashar

hashar commented Nov 28, 2017

Copy link
Copy Markdown

@TheKrush can you amend your commit based on @ardi69 suggestion? Merely add #ifdef UNICODE :)

@hashar

hashar commented Nov 28, 2017

Copy link
Copy Markdown

There is also #48

@TheKrush

Copy link
Copy Markdown
Author

Done.

@MangaD

MangaD commented Aug 13, 2019

Copy link
Copy Markdown

There is no reason to use #ifdef UNICODE, because when UNICODE isn't defined, WriteConsoleOutputCharacter simply calls WriteConsoleOutputCharacterA.

tapio added a commit that referenced this pull request Oct 20, 2019
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.

5 participants