summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-12-09 19:04:02 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-12-09 19:04:02 +0000
commitc3a908f04b578b391ecc86198368cc22a742d105 (patch)
tree2c00eea3284f14ecefd5355dbba27fa40f738f86
parent9dc1c1a876089392b088a2f2295c7ea5c75e2f6a (diff)
downloadrockbox-c3a908f04b578b391ecc86198368cc22a742d105.tar.gz
rockbox-c3a908f04b578b391ecc86198368cc22a742d105.zip
Always format error message using ANSI functions to get rid of type-punning when building with rbutil.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23913 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/sansapatcher/sansaio-win32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rbutil/sansapatcher/sansaio-win32.c b/rbutil/sansapatcher/sansaio-win32.c
index c27092762a..5797eae2aa 100644
--- a/rbutil/sansapatcher/sansaio-win32.c
+++ b/rbutil/sansapatcher/sansaio-win32.c
@@ -57,12 +57,12 @@ static int unlock_volume(HANDLE hDisk)
57 57
58void sansa_print_error(char* msg) 58void sansa_print_error(char* msg)
59{ 59{
60 char* pMsgBuf; 60 LPSTR pMsgBuf = NULL;
61 61
62 printf(msg); 62 printf(msg);
63 FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | 63 FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
64 FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), 64 FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(),
65 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&pMsgBuf, 65 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), pMsgBuf,
66 0, NULL); 66 0, NULL);
67 printf(pMsgBuf); 67 printf(pMsgBuf);
68 LocalFree(pMsgBuf); 68 LocalFree(pMsgBuf);