- Fix bug in PnpRegSzToString. The caller expects the result length to be the length of the string in bytes, not the string length
- Introduced in rev 46690

svn path=/trunk/; revision=52037
This commit is contained in:
Johannes Anderwald 2011-06-01 09:59:54 +00:00
parent 9048ea9dcf
commit 80f8e1b66c

View file

@ -178,7 +178,7 @@ PnpRegSzToString(IN PWCHAR RegSzData,
for (p = RegSzData; p < pp; p++) if (!*p) break;
/* Return it */
if (StringLength) *StringLength = p - RegSzData;
if (StringLength) *StringLength = (p - RegSzData) * sizeof(WCHAR);
return TRUE;
}