MdeModulePkg/BootManagerMenu: Add assertion to indicate no DIV by 0
authorRuiyu Ni <ruiyu.ni@intel.com>
Tue, 11 Apr 2017 02:07:43 +0000 (10:07 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Fri, 14 Apr 2017 10:28:50 +0000 (18:28 +0800)
commit51a1db9b24d850c785d240da599c4bf9ba1c0fd3
tree1a1cedff447ccbab5fba97a5225905d05cab7cab
parent0c9fc4b1679946f59efa1aaf11e2e9e1acab303d
MdeModulePkg/BootManagerMenu: Add assertion to indicate no DIV by 0

BootMenuSelectItem() contains code to DIV BootMenuData->ItemCount.
When BootMenuData->ItemCount can be 0, the DIV operation may
trigger CPU exception.
But in logic, this case won't happen. So add assertion to indicate
it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c