mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +00:00
[EVENTCREATE]: Check for a better last error after the GetModuleFileNameW call.
svn path=/trunk/; revision=72856
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user