RetVal is in bytes, so check against MAX_PATH in bytes
[reactos.git] / reactos / lib / kernel32 / process / create.c
index ccbcd5a..23fd7d1 100644 (file)
@@ -973,7 +973,7 @@ GetAppName:
         }
                 
         /* Now check if we have a file, and if the path size is OK */
-        if (!RetVal || RetVal >= (MAX_PATH / sizeof(WCHAR)))
+        if (!RetVal || RetVal >= (MAX_PATH * sizeof(WCHAR)))
         {
             ULONG PathType;
             HANDLE hFile;