diff options
author | Chris Wilson <chris+github@qwirx.com> | 2011-05-24 13:33:50 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2011-05-24 13:33:50 +0000 |
commit | f04cd092a2711160519c957a5ba8c28babd3004c (patch) | |
tree | 37b029814f70daacd3a6c70ede80d4e26aa4eae7 | |
parent | 88f19ef1b1d76c4b6d319c6c43fa11c6ed4e2a99 (diff) |
Blind fix for displaying error message as well as code when emu unicode conversion fails.
-rw-r--r-- | lib/win32/emu.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/win32/emu.cpp b/lib/win32/emu.cpp index 64858a27..2c1fb0df 100644 --- a/lib/win32/emu.cpp +++ b/lib/win32/emu.cpp @@ -243,7 +243,7 @@ char* ConvertFromWideString(const WCHAR* pString, unsigned int codepage) { ::syslog(LOG_WARNING, "Failed to convert wide string to narrow: " - "error %d", GetLastError()); + "%s", GetErrorMessage(GetLastError()).c_str()); errno = EINVAL; return NULL; } @@ -275,7 +275,7 @@ char* ConvertFromWideString(const WCHAR* pString, unsigned int codepage) { ::syslog(LOG_WARNING, "Failed to convert wide string to narrow: " - "error %i", GetLastError()); + "%s", GetErrorMessage(GetLastError()).c_str()); errno = EACCES; delete [] buffer; return NULL; @@ -304,7 +304,7 @@ bool ConvertFromWideString(const std::wstring& rInput, { ::syslog(LOG_WARNING, "Failed to convert wide string to narrow: " - "error %d", GetLastError()); + "%s", GetErrorMessage(GetLastError()).c_str()); errno = EINVAL; return false; } @@ -336,7 +336,7 @@ bool ConvertFromWideString(const std::wstring& rInput, { ::syslog(LOG_WARNING, "Failed to convert wide string to narrow: " - "error %i", GetLastError()); + "%s", GetErrorMessage(GetLastError()).c_str()); errno = EACCES; delete [] buffer; return false; |