mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 15:23:39 +00:00
[ATL]
- Fix processing of binary data in registrar scripts svn path=/trunk/; revision=54686
This commit is contained in:
parent
9a7346e654
commit
0edd7dacb4
1 changed files with 2 additions and 2 deletions
|
@ -473,7 +473,7 @@ private:
|
|||
inline unsigned int HexToBin(char a)
|
||||
{
|
||||
if (a >= '0' && a <= '9')
|
||||
return a - 0x30;
|
||||
return a - '0';
|
||||
if (a >= 'A' && a <= 'F')
|
||||
return a - 'A' + 10;
|
||||
if (a >= 'a' && a <= 'f')
|
||||
|
@ -630,7 +630,7 @@ private:
|
|||
return DISP_E_EXCEPTION;
|
||||
count = count / 2;
|
||||
for (curIndex = 0; curIndex < count; curIndex++)
|
||||
buf->str[curIndex] = (HexToBin(buf->str[curIndex * 2]) << 4) | HexToBin(buf->str[curIndex * 2 + 1]);
|
||||
((BYTE*)buf->str)[curIndex] = (HexToBin(buf->str[curIndex * 2]) << 4) | HexToBin(buf->str[curIndex * 2 + 1]);
|
||||
lres = RegSetValueEx(hkey, name.len ? name.str : NULL, 0, REG_BINARY, (PBYTE)buf->str, count);
|
||||
if (lres != ERROR_SUCCESS)
|
||||
hres = HRESULT_FROM_WIN32(lres);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue