]> git.proxmox.com Git - mirror_edk2.git/commit - SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c
SourceLevelDebugPkg/DebugAgent: Add typecast to fix sign extension
authorJeff Fan <jeff.fan@intel.com>
Fri, 26 Jun 2015 03:06:50 +0000 (03:06 +0000)
committervanjeff <vanjeff@Edk2>
Fri, 26 Jun 2015 03:06:50 +0000 (03:06 +0000)
commitfe0c434eb150ac8af9ecce10696585bdf0a169fe
tree75ee36089355478f368c239d261b555b87d89c60
parent244677494b934cd2d6da956622cc599d67c89343
SourceLevelDebugPkg/DebugAgent: Add typecast to fix sign extension

OffsetHigh is 16bit value and its type is UINT32 and defined in structure.
It will be 32bit int type after do 16-bit left-shift operation. Then it will
sign extension if cast it to UINT64 if its high bit is 1.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Scott Duplichan <scott@notabs.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17716 6f19259b-4bc3-4df7-8a09-765794883524
SourceLevelDebugPkg/Library/DebugAgent/DxeDebugAgent/DxeDebugAgentLib.c
SourceLevelDebugPkg/Library/DebugAgent/SecPeiDebugAgent/SecPeiDebugAgentLib.c
SourceLevelDebugPkg/Library/DebugAgent/SmmDebugAgent/SmmDebugAgentLib.c