mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Bugfix for ascii-hex conversions.
svn path=/trunk/; revision=3643
This commit is contained in:
parent
aa9fe526e2
commit
e1365d9be6
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: import.c,v 1.8 2002/09/08 10:23:17 chorns Exp $
|
/* $Id: import.c,v 1.9 2002/10/20 13:55:09 robd Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -381,10 +381,10 @@ getKeyValueDataFromChunk (PCHAR regChunk, PCHAR dataFormat, PCHAR data)
|
||||||
while (*regChunk != 0 && isxdigit (*regChunk))
|
while (*regChunk != 0 && isxdigit (*regChunk))
|
||||||
{
|
{
|
||||||
dataValue = (isdigit (*regChunk) ? *regChunk - '0' :
|
dataValue = (isdigit (*regChunk) ? *regChunk - '0' :
|
||||||
tolower(*regChunk) - 'a') << 4;
|
tolower(*regChunk) - 'a' + 10) << 4;
|
||||||
regChunk++;
|
regChunk++;
|
||||||
dataValue += (isdigit (*regChunk) ? *regChunk - '0' :
|
dataValue += (isdigit (*regChunk) ? *regChunk - '0' :
|
||||||
tolower(*regChunk) - 'a');
|
tolower(*regChunk) - 'a' + 10);
|
||||||
regChunk++;
|
regChunk++;
|
||||||
*data++ = dataValue;
|
*data++ = dataValue;
|
||||||
if (*regChunk == ',')
|
if (*regChunk == ',')
|
||||||
|
@ -404,7 +404,7 @@ getKeyValueDataFromChunk (PCHAR regChunk, PCHAR dataFormat, PCHAR data)
|
||||||
while (*regChunk != 0 && isxdigit(*regChunk))
|
while (*regChunk != 0 && isxdigit(*regChunk))
|
||||||
{
|
{
|
||||||
dataValue = (isdigit (*regChunk) ? *regChunk - '0' :
|
dataValue = (isdigit (*regChunk) ? *regChunk - '0' :
|
||||||
tolower(*regChunk) - 'a');
|
tolower(*regChunk) - 'a' + 10);
|
||||||
ulValue = (ulValue << 4) + dataValue;
|
ulValue = (ulValue << 4) + dataValue;
|
||||||
regChunk++;
|
regChunk++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue