projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[KERNEL32]
[reactos.git]
/
reactos
/
dll
/
win32
/
kernel32
/
client
/
path.c
diff --git
a/reactos/dll/win32/kernel32/client/path.c
b/reactos/dll/win32/kernel32/client/path.c
index
21415a5
..
dc3b044
100644
(file)
--- a/
reactos/dll/win32/kernel32/client/path.c
+++ b/
reactos/dll/win32/kernel32/client/path.c
@@
-210,9
+210,13
@@
BasepComputeProcessPath(IN PBASE_SEARCH_PATH_TYPE PathOrder,
}
else
{
}
else
{
- /* Add the length of the PATH variable */
+ /* Add the length of the PATH variable
unless it's empty
*/
ASSERT(!(EnvPath.Length & 1));
ASSERT(!(EnvPath.Length & 1));
- PathLengthInBytes += (EnvPath.Length + sizeof(L';'));
+ if (EnvPath.Length)
+ {
+ /* Reserve space for the variable and a semicolon */
+ PathLengthInBytes += (EnvPath.Length + sizeof(L';'));
+ }
}
break;
}
break;