Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
windows: don't print error when GetConsoleTitleW returns an empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Jun 7, 2012
1 parent f9abf5e commit f482236
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/platform_win32.cc
Expand Up @@ -155,7 +155,9 @@ static inline char* _getProcessTitle() {
result = GetConsoleTitleW(title_w, sizeof(title_w) / sizeof(WCHAR));

if (result == 0) {
winapi_perror("GetConsoleTitleW");
if (GetLastError() != ERROR_SUCCESS) {
winapi_perror("GetConsoleTitleW");
}
return NULL;
}

Expand Down

0 comments on commit f482236

Please sign in to comment.