From e1365d9be6bc942619261f75e117a214336139f7 Mon Sep 17 00:00:00 2001 From: Robert Dickenson Date: Sun, 20 Oct 2002 13:55:09 +0000 Subject: [PATCH] Bugfix for ascii-hex conversions. svn path=/trunk/; revision=3643 --- reactos/ntoskrnl/cm/import.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/cm/import.c b/reactos/ntoskrnl/cm/import.c index 3a838b3fa06..44839098f91 100644 --- a/reactos/ntoskrnl/cm/import.c +++ b/reactos/ntoskrnl/cm/import.c @@ -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 * PROJECT: ReactOS kernel @@ -381,10 +381,10 @@ getKeyValueDataFromChunk (PCHAR regChunk, PCHAR dataFormat, PCHAR data) while (*regChunk != 0 && isxdigit (*regChunk)) { dataValue = (isdigit (*regChunk) ? *regChunk - '0' : - tolower(*regChunk) - 'a') << 4; + tolower(*regChunk) - 'a' + 10) << 4; regChunk++; dataValue += (isdigit (*regChunk) ? *regChunk - '0' : - tolower(*regChunk) - 'a'); + tolower(*regChunk) - 'a' + 10); regChunk++; *data++ = dataValue; if (*regChunk == ',') @@ -404,7 +404,7 @@ getKeyValueDataFromChunk (PCHAR regChunk, PCHAR dataFormat, PCHAR data) while (*regChunk != 0 && isxdigit(*regChunk)) { dataValue = (isdigit (*regChunk) ? *regChunk - '0' : - tolower(*regChunk) - 'a'); + tolower(*regChunk) - 'a' + 10); ulValue = (ulValue << 4) + dataValue; regChunk++; }