Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f7ff9e76
Commit
f7ff9e76
authored
Aug 27, 2008
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Aug 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Avoid conversion to ANSI when importing hex values.
parent
b058648a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
regproc.c
programs/regedit/regproc.c
+8
-10
No files found.
programs/regedit/regproc.c
View file @
f7ff9e76
...
...
@@ -113,28 +113,28 @@ static BOOL convertHexToDWord(WCHAR* str, DWORD *dw)
/******************************************************************************
* Converts a hex comma separated values list into a binary string.
*/
static
BYTE
*
convertHexCSVToHex
(
WCHAR
*
str
W
,
DWORD
*
size
)
static
BYTE
*
convertHexCSVToHex
(
WCHAR
*
str
,
DWORD
*
size
)
{
char
*
s
;
WCHAR
*
s
;
BYTE
*
d
,
*
data
;
char
*
strA
=
GetMultiByteString
(
strW
);
/* The worst case is 1 digit + 1 comma per byte */
*
size
=
(
strlen
(
strA
)
+
1
)
/
2
;
*
size
=
(
lstrlenW
(
str
)
+
1
)
/
2
;
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
*
size
);
CHECK_ENOUGH_MEMORY
(
data
);
s
=
str
A
;
s
=
str
;
d
=
data
;
*
size
=
0
;
while
(
*
s
!=
'\0'
)
{
UINT
wc
;
char
*
end
;
WCHAR
*
end
;
wc
=
strtoul
(
s
,
&
end
,
16
);
wc
=
strtoul
W
(
s
,
&
end
,
16
);
if
(
end
==
s
||
wc
>
0xff
||
(
*
end
&&
*
end
!=
','
))
{
char
*
strA
=
GetMultiByteString
(
s
);
fprintf
(
stderr
,
"%s: ERROR converting CSV hex stream. Invalid value at '%s'
\n
"
,
getAppName
(),
s
);
getAppName
(),
s
trA
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
HeapFree
(
GetProcessHeap
(),
0
,
strA
);
return
NULL
;
...
...
@@ -145,8 +145,6 @@ static BYTE* convertHexCSVToHex(WCHAR *strW, DWORD *size)
s
=
end
;
}
HeapFree
(
GetProcessHeap
(),
0
,
strA
);
return
data
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment