BaseTools/Source/Python/Common/Expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The issue is that the string 'LPC' starts with the 'L' character and
this is being confused with L" or L' for a Unicode string or Unicode
character.
Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=831
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
---
BaseTools/Source/Python/Common/Expression.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 953a412..55fa06d 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -162,11 +162,11 @@ class ValueExpression(object):
if Oprand1[0] in ['"', "'"] or Oprand1.startswith('L"') or Oprand1.startswith("L'")or Oprand1.startswith('UINT'):
Oprand1, Size = ParseFieldValue(Oprand1)
else:
Oprand1,Size = ParseFieldValue('"' + Oprand1 + '"')
if type(Oprand2) == type(''):
- if Oprand2[0] in ['"', "'", 'L'] or Oprand2.startswith('UINT'):
+ if Oprand2[0] in ['"', "'"] or Oprand2.startswith('L"') or Oprand2.startswith("L'") or Oprand2.startswith('UINT'):
Oprand2, Size = ParseFieldValue(Oprand2)
else:
Oprand2, Size = ParseFieldValue('"' + Oprand2 + '"')
if type(Oprand1) == type('') or type(Oprand2) == type(''):
raise BadExpression(ERR_STRING_EXPR % Operator)
--
2.6.1.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Liming Gao <liming.gao@intel.com>
>-----Original Message-----
>From: Zhu, Yonghong
>Sent: Friday, December 29, 2017 8:28 AM
>To: edk2-devel@lists.01.org
>Cc: Gao, Liming <liming.gao@intel.com>
>Subject: [Patch] BaseTools: Fix the bug for QuarkPlatformPkg build failure
>
>The issue is that the string 'LPC' starts with the 'L' character and
>this is being confused with L" or L' for a Unicode string or Unicode
>character.
>
>Fixes:https://bugzilla.tianocore.org/show_bug.cgi?id=831
>Cc: Liming Gao <liming.gao@intel.com>
>Contributed-under: TianoCore Contribution Agreement 1.1
>Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
>---
> BaseTools/Source/Python/Common/Expression.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/BaseTools/Source/Python/Common/Expression.py
>b/BaseTools/Source/Python/Common/Expression.py
>index 953a412..55fa06d 100644
>--- a/BaseTools/Source/Python/Common/Expression.py
>+++ b/BaseTools/Source/Python/Common/Expression.py
>@@ -162,11 +162,11 @@ class ValueExpression(object):
> if Oprand1[0] in ['"', "'"] or Oprand1.startswith('L"') or
>Oprand1.startswith("L'")or Oprand1.startswith('UINT'):
> Oprand1, Size = ParseFieldValue(Oprand1)
> else:
> Oprand1,Size = ParseFieldValue('"' + Oprand1 + '"')
> if type(Oprand2) == type(''):
>- if Oprand2[0] in ['"', "'", 'L'] or Oprand2.startswith('UINT'):
>+ if Oprand2[0] in ['"', "'"] or Oprand2.startswith('L"') or
>Oprand2.startswith("L'") or Oprand2.startswith('UINT'):
> Oprand2, Size = ParseFieldValue(Oprand2)
> else:
> Oprand2, Size = ParseFieldValue('"' + Oprand2 + '"')
> if type(Oprand1) == type('') or type(Oprand2) == type(''):
> raise BadExpression(ERR_STRING_EXPR % Operator)
>--
>2.6.1.windows.1
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2025 Red Hat, Inc.