]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: Fix generating array's size is incorrect in AutoGen.c
authorYunhua Feng <yunhuax.feng@intel.com>
Mon, 7 May 2018 10:26:24 +0000 (18:26 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 10 May 2018 00:36:00 +0000 (08:36 +0800)
commit6b285ca3663d3c71cc68d01684a98f0d7537885e
tree3340c6ef5784e57b3f9e3567a489b8f5dea34694
parent1dc287c3a3f1f090ef6b8ff80f7b3b3725071471
BaseTools: Fix generating array's size is incorrect in AutoGen.c

case example:
DSC:
 [PcdsFixedAtBuild]
  PcdToken.PcdName | "A"
 [Components]
 TestPkg/TestDriver.inf {
  PcdToken.PcdName | {0x41,0x42,0x43,0x44}
 }

Generating the size of array is incorrect in AutoGen.c
 GLOBAL_REMOVE_IF_UNREFERENCED const UINT8
 _gPcd_FixedAtBuild_PcdName[2] = {0x41,0x42,0x43,0x44};

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=950
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/Python/AutoGen/GenC.py