mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
sansapatcher: Correct use of FormatMessageA() for windows builds
Change-Id: I3e026400fa0440221b4fd6d8c96f515737e36433
This commit is contained in:
parent
aa4ea8e279
commit
b54b10dc6d
1 changed files with 6 additions and 6 deletions
|
|
@ -60,12 +60,13 @@ void sansa_print_error(char* msg)
|
|||
LPSTR pMsgBuf = NULL;
|
||||
|
||||
printf(msg);
|
||||
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), pMsgBuf,
|
||||
0, NULL);
|
||||
printf(pMsgBuf);
|
||||
LocalFree(pMsgBuf);
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&pMsgBuf,
|
||||
0, NULL)) {
|
||||
printf(pMsgBuf);
|
||||
LocalFree(pMsgBuf);
|
||||
}
|
||||
}
|
||||
|
||||
int sansa_open(struct sansa_t* sansa, int silent)
|
||||
|
|
@ -214,4 +215,3 @@ int sansa_write(struct sansa_t* sansa, int nbytes)
|
|||
return count;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue