Alexander Morozov : setupapi: Creating SymbolicLink value in registry as in Windows XP.
Alexandre Julliard
julliard at winehq.org
Wed Apr 2 06:55:39 CDT 2008
Module: wine
Branch: master
Commit: b622101ef252071f6797368f0b4c0911ade2bd5a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b622101ef252071f6797368f0b4c0911ade2bd5a
Author: Alexander Morozov <amorozov at etersoft.ru>
Date: Tue Apr 1 14:24:50 2008 +0300
setupapi: Creating SymbolicLink value in registry as in Windows XP.
---
dlls/setupapi/devinst.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 60da5e8..e9c8124 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -244,7 +244,7 @@ static LPWSTR SETUPDI_CreateSymbolicLinkPath(LPCWSTR instanceId,
/* omit length of format specifiers, but include NULL terminator: */
len = lstrlenW(fmt) - 4 + 1;
len += lstrlenW(instanceId) + lstrlenW(guidStr);
- if (ReferenceString)
+ if (ReferenceString && *ReferenceString)
{
/* space for a hash between string and reference string: */
len += lstrlenW(ReferenceString) + 1;
@@ -258,10 +258,10 @@ static LPWSTR SETUPDI_CreateSymbolicLinkPath(LPCWSTR instanceId,
/* replace '\\' with '#' after the "\\\\?\\" beginning */
for (ptr = strchrW(ret + 4, '\\'); ptr; ptr = strchrW(ptr + 1, '\\'))
*ptr = '#';
- if (ReferenceString)
+ if (ReferenceString && *ReferenceString)
{
- ret[printed - 1] = '\\';
- lstrcpyW(ret + printed, ReferenceString);
+ ret[printed] = '\\';
+ lstrcpyW(ret + printed + 1, ReferenceString);
}
}
return ret;
More information about the wine-cvs
mailing list