Author: hbelusca
Date: Thu Sep 29 17:42:20 2016
New Revision: 72856
URL:
http://svn.reactos.org/svn/reactos?rev=72856&view=rev
Log:
[EVENTCREATE]: Check for a better last error after the GetModuleFileNameW call.
Modified:
trunk/reactos/base/applications/cmdutils/eventcreate/eventcreate.c
Modified: trunk/reactos/base/applications/cmdutils/eventcreate/eventcreate.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/eventcreate/eventcreate.c [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/cmdutils/eventcreate/eventcreate.c [iso-8859-1] Thu
Sep 29 17:42:20 2016
@@ -249,7 +249,7 @@
* - 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),