mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 16:03:52 +00:00
[EVENTCREATE]: Check for a better last error after the GetModuleFileNameW call.
svn path=/trunk/; revision=72856
This commit is contained in:
parent
fbebe613b7
commit
a8badad1fa
1 changed files with 1 additions and 1 deletions
|
@ -249,7 +249,7 @@ InstallEventSource(
|
|||
* - In case of failure, use a default path.
|
||||
*/
|
||||
PathSize = GetModuleFileNameW(NULL, ExePath, ARRAYSIZE(ExePath));
|
||||
if ((PathSize == 0) || (GetLastError() != ERROR_SUCCESS))
|
||||
if ((PathSize == 0) || (GetLastError() == ERROR_INSUFFICIENT_BUFFER))
|
||||
{
|
||||
/* We failed, copy the default value */
|
||||
StringCchCopyW(ExePath, ARRAYSIZE(ExePath),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue