summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/C')
-rw-r--r--BaseTools/Source/C/Common/ParseInf.c12
-rw-r--r--BaseTools/Source/C/VfrCompile/Makefile2
2 files changed, 11 insertions, 3 deletions
diff --git a/BaseTools/Source/C/Common/ParseInf.c b/BaseTools/Source/C/Common/ParseInf.c
index eb01d30527..bbccb61732 100644
--- a/BaseTools/Source/C/Common/ParseInf.c
+++ b/BaseTools/Source/C/Common/ParseInf.c
@@ -506,11 +506,19 @@ Returns:
//
// Add each character to the result
//
- if (IsHex || (AsciiString[Index] == '0' && (AsciiString[Index + 1] == 'x' || AsciiString[Index + 1] == 'X'))) {
+
+ //
+ // Skip first two chars only if the string starts with '0x' or '0X'
+ //
+ if (AsciiString[Index] == '0' && (AsciiString[Index + 1] == 'x' || AsciiString[Index + 1] == 'X')) {
+ IsHex = TRUE;
+ Index += 2;
+ }
+ if (IsHex) {
//
// Convert the hex string.
//
- for (Index = Index + 2; AsciiString[Index] != '\0'; Index++) {
+ for (; AsciiString[Index] != '\0'; Index++) {
CurrentChar = AsciiString[Index];
if (CurrentChar == ' ') {
break;
diff --git a/BaseTools/Source/C/VfrCompile/Makefile b/BaseTools/Source/C/VfrCompile/Makefile
index caadc40c4b..0272966087 100644
--- a/BaseTools/Source/C/VfrCompile/Makefile
+++ b/BaseTools/Source/C/VfrCompile/Makefile
@@ -12,7 +12,7 @@
#
!INCLUDE ..\Makefiles\ms.common
-CPPFLAGS = $(CPPFLAGS) /WX /D PCCTS_USE_NAMESPACE_STD /D VFREXP_DEBUG
+CPPFLAGS = $(CPPFLAGS) /WX /D PCCTS_USE_NAMESPACE_STD
APPNAME = VfrCompile
LIBS = $(LIB_PATH)\Common.lib