]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/EbcDebugger: Operands of same size for bitwise operation
authorHao Wu <hao.a.wu@intel.com>
Thu, 24 Nov 2016 02:18:19 +0000 (10:18 +0800)
committerHao Wu <hao.a.wu@intel.com>
Fri, 25 Nov 2016 05:34:13 +0000 (13:34 +0800)
Operands in a bitwise operation should have the same size to eliminate
unexpected results.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdeModulePkg/Universal/EbcDxe/EbcDebugger/Edb.c

index e0b85c70eff52857fc2460b4db4da141066e3982..9e44026ab9ad077d53ceac873561de15ce1a22a5 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2007, Intel Corporation\r
+Copyright (c) 2007 - 2016, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -360,8 +360,8 @@ Returns:
   //\r
   // clear STEP flag in any condition.\r
   //\r
-  if (SystemContext.SystemContextEbc->Flags & VMFLAGS_STEP) {\r
-    SystemContext.SystemContextEbc->Flags &= ~VMFLAGS_STEP;\r
+  if (SystemContext.SystemContextEbc->Flags & ((UINT64) VMFLAGS_STEP)) {\r
+    SystemContext.SystemContextEbc->Flags &= ~((UINT64) VMFLAGS_STEP);\r
   }\r
 \r
   if (!Initialized) {\r