- correct fix, also free the allocated buffer

svn path=/trunk/; revision=41433
This commit is contained in:
Kamil Hornicek 2009-06-17 11:08:00 +00:00
parent 8519197da3
commit 7e8ae7ca6b

View file

@ -307,8 +307,11 @@ void printWindowsError()
(LPTSTR) &lpMsgBuf, (LPTSTR) &lpMsgBuf,
0, NULL ); 0, NULL );
printf("Error: %p\nPress Enter..\n", lpMsgBuf); _tprintf(_T("Error: %s\nPress Enter..\n"), (LPTSTR)lpMsgBuf);
getchar(); getchar();
if(lpMsgBuf)
LocalFree(lpMsgBuf);
} }
} }